hanbaoshan
2020-08-06 d656ff9cf8c97a01c0cc990d935e4b42b314be22
src/pages/desktop/index/components/Tools.vue
@@ -12,10 +12,11 @@
      </div>
    </div>
    <div class="tools-middle">
      <div v-for="dock in this.$store.state.desktop.minDocks" :key="dock.id" class="dock-item-wrap">
      <div v-for="dock in $store.state.desktop.minDocks" :key="dock.id" class="dock-item-wrap" :class="{'actived':dock.highlight}">
        <a @click="dockClick(dock)">
          <img class="dock-item" :src="dock.src" :alt="dock.alt" />
          <img class="dock-shot" :src="dock.screenshot" :alt="dock.name" />
          <img class="dock-shot" :src="dock.screenshot" v-if="dock.screenshot"/>
        </a>
      </div>
    </div>
@@ -44,7 +45,9 @@
    return {
      publicPath: process.env.BASE_URL,
      notificationCenterVisible: false,
      notificationCenterMessageCount: 0
      notificationCenterMessageCount: 0,
      maxOrder: 0,
      maxOrderOne: ''
    };
  },
  created() {
@@ -58,6 +61,23 @@
      }, 600)
    ];
  },
  // watch:{
  //   '$store.state.desktop.frames':{
  //     handler(n,o){
  //       if(n){
  //         debugger;
  //         n.forEach((item,index) => {
  //           if(item.order >= this.maxOrder){
  //             this.maxOrderOne = item.id;
  //           }
  //         });
  //       }
  //     },
  //     deep: true
  //   }
  // },
  methods: {
    notificationCenterClick: function () {
      this.notificationCenterVisible = !this.notificationCenterVisible;
@@ -85,7 +105,8 @@
          id: frame.id,
          src: frame.icon,
          alt: frame.title,
          type: "3"
          type: "3",
          screenshot: ''
        });
      })
    },
@@ -102,6 +123,9 @@
        });
      } else if (dock.type === "3") {
        this.$store.commit("desktop/resetMinFrame", dock.id);
        //点击的iframe置顶并高亮
        debugger
        this.$store.commit("desktop/refreshFrame", dock);
      }
    }
  }
@@ -153,11 +177,13 @@
  border-bottom: 2px solid transparent;
  position: relative;
}
.tools .tools-middle .dock-item-wrap:hover,
.tools .tools-middle .dock-item-wrap.clicked {
.tools .tools-middle .dock-item-wrap:hover{
  color: white;
  background-color: #98aabe;
}
.tools-middle .dock-item-wrap.actived{
  border-color: #40c3ff;
  background-color: #98aabe;
}
.dock-item-wrap a {
  height: 100%;