From a680a84d91fb6501951d0265e9b347695568c546 Mon Sep 17 00:00:00 2001
From: 抓蛙师 <770492966@qq.com>
Date: 星期二, 20 九月 2022 16:41:40 +0800
Subject: [PATCH] !236 前端适配多字段排序功能案例OSS页面(重新排序需点击重置按钮,否则按照点击顺序依次排序,重复点击的字段排序位置不发生改变) * 完善前端适配多字段排序功能案例OSS页面(完善排序图标显示效果和重置效果,支持正序,倒序,取消排序) * 前端适配多字段排序功能案例OSS页面(重新排序需点击重置按钮,否则按照点击顺序依次排序,重复点击的字段排序位置不发生改变)

---
 ruoyi-ui/src/components/ThemePicker/index.vue |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/ruoyi-ui/src/components/ThemePicker/index.vue b/ruoyi-ui/src/components/ThemePicker/index.vue
index 3879c5a..1714e1f 100644
--- a/ruoyi-ui/src/components/ThemePicker/index.vue
+++ b/ruoyi-ui/src/components/ThemePicker/index.vue
@@ -31,19 +31,21 @@
       immediate: true
     },
     async theme(val) {
+      await this.setTheme(val)
+    }
+  },
+  created() {
+    if(this.defaultTheme !== ORIGINAL_THEME) {
+      this.setTheme(this.defaultTheme)
+    }
+  },
+
+  methods: {
+    async setTheme(val) {
       const oldVal = this.chalk ? this.theme : ORIGINAL_THEME
       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: '  Compiling the theme',
-        customClass: 'theme-message',
-        type: 'success',
-        duration: 0,
-        iconClass: 'el-icon-loading'
-      })
 
       const getHandler = (variable, id) => {
         return () => {
@@ -81,12 +83,8 @@
       })
 
       this.$emit('change', val)
+    },
 
-      $message.close()
-    }
-  },
-
-  methods: {
     updateStyle(style, oldCluster, newCluster) {
       let newStyle = style
       oldCluster.forEach((color, index) => {

--
Gitblit v1.9.3