hanbaoshan
2020-08-05 a51a787a5ecb7d249dba434be74160c85516c555
minDock高亮显示
3个文件已修改
30 ■■■■■ 已修改文件
src/pages/desktop/index/components/Tools.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/components/ToolsEntry.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/store/modules/desktop.js 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/components/Tools.vue
@@ -122,7 +122,7 @@
        this.$store.commit("desktop/resetMinFrame", dock.id);
        //点击的iframe置顶并高亮
        debugger
        //this.$store.commit("desktop/refreshFrame", dock);
        this.$store.commit("desktop/refreshFrame", dock);
      }
    }
  }
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);
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) {
      //已经在mindock里
      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最近打开的状态isShow为true的dock置为高亮
      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) => {