hanbaoshan
2020-08-05 a51a787a5ecb7d249dba434be74160c85516c555
src/pages/desktop/index/components/Tools.vue
@@ -6,15 +6,13 @@
        @click="togglePreference()"
      >
        <img class="system" :src="`${publicPath}images/desktop/header-icon/system.png`" />
        <!-- <span class="fa fa-apple"></span> -->
      </div>
      <div class="tools-icon">
        <!-- <span class="fa fa-safari"></span> -->
      <div class="tools-icon no-hover-style">
        <img class="smart-ai" :src="`${publicPath}images/desktop/header-icon/SmartAI.png`" alt />
      </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 this.$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" />
@@ -23,27 +21,17 @@
    </div>
    <div class="tools-right">
      <div class="tools-icon">
        <!-- <span class="fa fa-battery-full"></span> -->
        <img :src="`${publicPath}images/desktop/header-icon/search.png`" alt />
      </div>
      <div class="tools-icon">
        <!-- <span class="fa fa-battery-full"></span> -->
        <img :src="`${publicPath}images/desktop/header-icon/help.png`" alt />
      </div>
      <div class="tools-icon" @click="notificationCenterClick()">
        <!-- <span class="fa fa-battery-full"></span> -->
        <img :src="`${publicPath}images/desktop/header-icon/notice.png`" alt />
      </div>
      <div class="tools-icon">
        <!-- <span class="fa fa-battery-full"></span> -->
        <img :src="`${publicPath}images/desktop/header-icon/user.png`" alt />
      </div>
      <!-- <timer></timer> -->
      <!-- <div class="tools-icon tools-notification-center" @click="notificationCenterClick()">
          <span
            :class="['fa', {'fa-list-ul':notificationCenterNoMessage()}, {'fa-comment-o on-new-msg':!notificationCenterNoMessage()},{'fa-commenting-o':notificationCenterMessageFlicker()}]"
          ></span>
      </div>-->
    </div>
  </div>
</template>
@@ -56,7 +44,9 @@
    return {
      publicPath: process.env.BASE_URL,
      notificationCenterVisible: false,
      notificationCenterMessageCount: 0
      notificationCenterMessageCount: 0,
      maxOrder: 0,
      maxOrderOne: ''
    };
  },
  created() {
@@ -70,6 +60,22 @@
      }, 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;
@@ -102,6 +108,7 @@
      })
    },
    dockClick(dock) {
      debugger
      if (dock.type === "1") {
        window.open(dock.url);
      } else if (dock.type === "2") {
@@ -113,6 +120,9 @@
        });
      } else if (dock.type === "3") {
        this.$store.commit("desktop/resetMinFrame", dock.id);
        //点击的iframe置顶并高亮
        debugger
        this.$store.commit("desktop/refreshFrame", dock);
      }
    }
  }
@@ -164,12 +174,12 @@
  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;
  cursor: pointer;
}
.dock-item-wrap a {
  height: 100%;
@@ -199,8 +209,8 @@
  padding: 0 15px;
}
.tools .tools-icon:hover,
.tools .tools-icon.clicked {
.tools .tools-icon:not(.no-hover-style):hover,
.tools .tools-icon:not(.no-hover-style).clicked {
  color: white;
  background-color: #98aabe;
  cursor: pointer;