Browse Source

修改点击菜单栏时间

pangqijun 1 year ago
parent
commit
18fc1159c1
1 changed files with 12 additions and 8 deletions
  1. 12 8
      src/page/index/sidebar/sidebarItem.vue

+ 12 - 8
src/page/index/sidebar/sidebarItem.vue

@@ -114,14 +114,18 @@ export default {
       if (this.screen <= 1) this.$store.commit("SET_COLLAPSE");
       this.$router.$avueRouter.group = item.group;
       this.$router.$avueRouter.meta = item.meta;
-      this.$router.push({
-        path: this.$router.$avueRouter.getPath({
-          name: item[this.labelKey],
-          src: item[this.pathKey],
-          i18n: (item.meta || {}).i18n
-        }),
-        query: item.query
-      });
+      if (item.isOpen === 1) {// 打开一个新窗口
+        window.open(item.path)
+      } else {
+        this.$router.push({
+          path: this.$router.$avueRouter.getPath({
+            name: item[this.labelKey],
+            src: item[this.pathKey],
+            i18n: (item.meta || {}).i18n
+          }),
+          query: item.query
+        });
+      }
     }
   }
 };