瀏覽代碼

修改主题样式本地读取

RuoYi 8 月之前
父節點
當前提交
739a1c262d
共有 2 個文件被更改,包括 1 次插入4 次删除
  1. 0 0
      ruoyi-ui/public/styles/theme-chalk/index.css
  2. 1 4
      ruoyi-ui/src/components/ThemePicker/index.vue

File diff suppressed because it is too large
+ 0 - 0
ruoyi-ui/public/styles/theme-chalk/index.css


+ 1 - 4
ruoyi-ui/src/components/ThemePicker/index.vue

@@ -8,7 +8,6 @@
 </template>
 
 <script>
-const version = require('element-ui/package.json').version // element-ui version from node_modules
 const ORIGINAL_THEME = '#409EFF' // default color
 
 export default {
@@ -39,7 +38,6 @@ export default {
       this.setTheme(this.defaultTheme)
     }
   },
-
   methods: {
     async setTheme(val) {
       const oldVal = this.chalk ? this.theme : ORIGINAL_THEME
@@ -63,12 +61,11 @@ export default {
       }
 
       if (!this.chalk) {
-        const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`
+        const url = `/styles/theme-chalk/index.css`
         await this.getCSSString(url, 'chalk')
       }
 
       const chalkHandler = getHandler('chalk', 'chalk-style')
-
       chalkHandler()
 
       const styles = [].slice.call(document.querySelectorAll('style'))

Some files were not shown because too many files changed in this diff