From 2016aa7a49026fc6ead02604200889a653ad6cdc Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期一, 02 十一月 2026 14:59:24 +0800
Subject: [PATCH] 关闭默认主题风格设置打开
---
src/components/RightPanel/index.vue | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/components/RightPanel/index.vue b/src/components/RightPanel/index.vue
index fbf27eb..40ddb0f 100644
--- a/src/components/RightPanel/index.vue
+++ b/src/components/RightPanel/index.vue
@@ -43,7 +43,10 @@
watch: {
show(value) {
if (value && !this.clickNotClose) {
- this.addEventClick()
+ // 寤跺悗鍒版湰娆$偣鍑荤粨鏉熷悗鍐嶇洃鍚紝閬垮厤鈥滅偣寮�灏辫鍚屼竴娆$偣鍑诲叧鎺夆��
+ this.$nextTick(this.addEventClick)
+ } else {
+ window.removeEventListener('click', this.closeSidebar)
}
if (value) {
addClass(document.body, 'showRightPanel')
@@ -54,14 +57,16 @@
},
mounted() {
this.insertToBody()
- this.addEventClick()
},
beforeDestroy() {
+ window.removeEventListener('click', this.closeSidebar)
const elx = this.$refs.rightPanel
elx.remove()
},
methods: {
addEventClick() {
+ // 鍏堢Щ闄ゅ啀娣诲姞锛岄伩鍏嶉噸澶嶇洃鍚�
+ window.removeEventListener('click', this.closeSidebar)
window.addEventListener('click', this.closeSidebar)
},
closeSidebar(evt) {
--
Gitblit v1.9.3