From a51a787a5ecb7d249dba434be74160c85516c555 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期三, 05 八月 2020 10:25:12 +0800
Subject: [PATCH] minDock高亮显示
---
src/pages/desktop/index/store/modules/desktop.js | 27 +++++++++++++++++++--------
src/pages/desktop/index/components/ToolsEntry.vue | 1 -
src/pages/desktop/index/components/Tools.vue | 2 +-
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/src/pages/desktop/index/components/Tools.vue b/src/pages/desktop/index/components/Tools.vue
index 12d3fd2..7aad07c 100644
--- a/src/pages/desktop/index/components/Tools.vue
+++ b/src/pages/desktop/index/components/Tools.vue
@@ -122,7 +122,7 @@
this.$store.commit("desktop/resetMinFrame", dock.id);
//鐐瑰嚮鐨刬frame缃《骞堕珮浜�
debugger
- //this.$store.commit("desktop/refreshFrame", dock);
+ this.$store.commit("desktop/refreshFrame", dock);
}
}
}
diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue
index f721fb0..2caf1af 100644
--- a/src/pages/desktop/index/components/ToolsEntry.vue
+++ b/src/pages/desktop/index/components/ToolsEntry.vue
@@ -47,7 +47,6 @@
alt: dock.title,
type: "3",
highlight: true,
- isOpen: dock.isOpen
});
} else if (dock.type === '2' && dock.isOpen) {
this.$store.commit('desktop/resetMinFrame', dock.id);
diff --git a/src/pages/desktop/index/store/modules/desktop.js b/src/pages/desktop/index/store/modules/desktop.js
index 72ecaa8..a86b69f 100644
--- a/src/pages/desktop/index/store/modules/desktop.js
+++ b/src/pages/desktop/index/store/modules/desktop.js
@@ -105,10 +105,24 @@
addMinDock: (state, dock) => {
debugger
let ids = state.minDocks.map(item => item.id);
+
if (ids.indexOf(dock.id) > -1) {
//宸茬粡鍦╩indock閲�
let curFrame = state.frames.find(frame => frame.id == dock.id);
curFrame.isShow = false;
+ let minOne = state.minDocks.find(one => one.id == dock.id);
+
+ minOne.highlight = false;
+ //鎵惧埌minDocks鏈�杩戞墦寮�鐨勭姸鎬乮sShow涓簍rue鐨刣ock缃负楂樹寒
+ let minLen = state.minDocks.length;
+ for(var i = minLen-1; i >= 0; i--){
+ debugger
+ let temp = state.frames.find(frame=>frame.id == state.minDocks[i].id);
+ if(temp.isShow){
+ state.minDocks[i].highlight = true;
+ return;
+ }
+ }
return;
}
// state.frames.find(function (it) {
@@ -172,12 +186,14 @@
if (it.id === item.id) {
it.order = 1;
- state.minDocks.forEach(min=>{
+ state.minDocks.forEach((min,index)=>{
+ debugger
if(min.id == it.id){
debugger
min.highlight = true;
}else{
min.highlight = false;
+
}
})
} else {
@@ -193,17 +209,12 @@
state.frames.find(function (it) {
if (it.id === id) {
it.isShow = true;
+
return true;
}
return false;
});
- // state.minDocks.find(function (it, idx) {
- // if (it.id === id) {
- // state.minDocks.splice(idx, 1);
- // return true;
- // }
- // return false;
- // });
+
},
removeMessageById: (state, id) => {
--
Gitblit v1.8.0