소스 검색

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

QM303176530 4 년 전
부모
커밋
9bac9fb29a
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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: {