From e41dd8a0f1d4fd310b4e57094bed2bd85b3a22a6 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期五, 19 十一月 2021 14:53:16 +0800
Subject: [PATCH] !370 fix 修复关闭 xss 功能导致可重复读 RepeatableFilter 失效 Merge pull request !370 from 疯狂的狮子Li/master
---
ruoyi-ui/src/components/ThemePicker/index.vue | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/ruoyi-ui/src/components/ThemePicker/index.vue b/ruoyi-ui/src/components/ThemePicker/index.vue
index 5c16ee4..4ba9bd2 100644
--- a/ruoyi-ui/src/components/ThemePicker/index.vue
+++ b/ruoyi-ui/src/components/ThemePicker/index.vue
@@ -31,18 +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('#', ''))
-
- const $message = this.$message({
- message: ' Compiling the theme',
- customClass: 'theme-message',
- type: 'success',
- duration: 0,
- iconClass: 'el-icon-loading'
- })
const getHandler = (variable, id) => {
return () => {
@@ -80,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