hanbaoshan
2020-08-04 51f8540633fe9eaa9c2c9b5ff439f2bf9bf9094e
src/pages/desktop/index/components/ToolsEntry.vue
@@ -30,22 +30,18 @@
  },
  methods: {
    dockClick(dock) {
      debugger
      if (dock.type === '1') {
        window.open(dock.url);
      } else if (dock.type === '2') {
        let ids = this.$store.getters["desktop/frames"].map(item => item.id);
        if (ids.indexOf(dock.id) > -1) {
          this.$store.commit('desktop/resetMinFrame', dock.id);
          this.resetDockItem();
          return;
        }
        let ret = this.$store.dispatch('desktop/addFrame', {
      } else if (dock.type === '2' && !dock.isOpen) {
        this.$store.dispatch('desktop/addFrame', {
          id: dock.id,
          icon: dock.src,
          title: dock.name,
          url: dock.url
        });
      } else if (dock.type === '2' && dock.isOpen) {
        this.$store.commit('desktop/resetMinFrame', dock.id);
      }
    },
    resetDockItem() {