ソースを参照

修复自定义常用功能

tianyabing 2 年 前
コミット
04beb5a33c

+ 3 - 3
src/components/dashboard/commonFuncManage/functionManage.vue

@@ -75,12 +75,12 @@ export default {
       }
       if (item.isSso) {
         let index = this.ssoSystems.findIndex(i=>i.name==item.name)
-        if (index) {
+        if (index>-1) {
           this.ssoSystems.splice(index, 1)
         }
       } else {
         let index = this.functions.findIndex(i=>i.name==item.name)
-        if (index) {
+        if (index>-1) {
           this.functions.splice(index, 1)
         }
       }
@@ -88,7 +88,7 @@ export default {
     },
     minusFunction(item) {
       let index = this.customFunction.findIndex(i => i.name==item.name);
-      if (index) {
+      if (index>-1) {
         this.customFunction.splice(index, 1);
         if (item.isSso) {
           this.ssoSystems.push(item);

+ 1 - 1
src/views/HomeView.vue

@@ -29,7 +29,7 @@
         <!-- 内容 -->
         <a-layout-content class="home-page">
           <Transition name="fade-transform" mode="out-in">
-            <router-view :key="$route.matched[1].name?$route.matched[1].name:-1" />
+            <router-view :key="$route.matched[1]?$route.matched[1].name?$route.matched[1].name:-1:-1" />
           </transition>
         </a-layout-content>
       </a-layout>