Browse Source

增加侧边栏配置其他网站功能(name以:http://开头或者https://开头即可)

QM303176530 4 years ago
parent
commit
9bac9fb29a
1 changed files with 5 additions and 1 deletions
  1. 5 1
      web/src/view/layout/aside/index.vue

+ 5 - 1
web/src/view/layout/aside/index.vue

@@ -46,7 +46,11 @@ export default {
           }
         });
       if (index === this.$route.name) return;
-      this.$router.push({ name: index, query, params });
+      if (index.indexOf("http://") > -1 || index.indexOf("https://") > -1) {
+        window.open(index);
+      } else {
+        this.$router.push({ name: index, query, params });
+      }
     }
   },
   computed: {