loulijun2021
2023-02-13 8ccc85d309d5d6f3f3f02852061425a20ec45e74
src/components/ThemePicker/index.vue
@@ -1,7 +1,7 @@
<template>
  <el-color-picker
    v-model="theme"
    :predefine="['#409EFF', '#1890ff', '#304156','#212121','#11a983', '#13c2c2', '#6959CD', '#f5222d', ]"
    :predefine="['#409EFF', '#1890ff', '#304156','#212121','#42B983','#11a983', '#13c2c2', '#6959CD', '#f5222d', ]"
    class="theme-picker"
    popper-class="theme-picker-dropdown"
  />
@@ -35,7 +35,6 @@
      if (typeof val !== 'string') return
      const themeCluster = this.getThemeCluster(val.replace('#', ''))
      const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
      console.log(themeCluster, originalCluster)
      const $message = this.$message({
        message: '  正在切换主题',
@@ -65,7 +64,8 @@
        // https://unpkg.com/element-ui@2.15.6/lib/theme-chalk/index.css
        // http://121.196.36.24:8001/VueTheme/theme.css
        const url = 'http://121.196.36.24:8001/VueTheme/theme.css'
        // const url = 'http://121.196.36.24:8001/VueTheme/theme.css'
        const url = process.env.VUE_APP_BASE_API_FILE + '/VueTheme/theme.css'
        await this.getCSSString(url, 'chalk')
      }