Skip to content

how to custom Dynamic Theme #4965

@qiuzongyuan

Description

@qiuzongyuan
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

能够运行时切换 动态主题

What does the proposed API look like?

官网文档提供的是编译时切换主题

// vite.config.js
css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        modifyVars: {
          'primary-color': '#1DA57A'
        }
      }
    }
  }

尝试了一下,确实可以

但是,希望能有个运行时动态切换主题可行方案(例如,点击开关可以直接切换暗黑主题)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions