Explorar o código

关闭全部导航栏保留当前路由所在导航栏

wxy hai 3 meses
pai
achega
61b516c1d4
Modificáronse 2 ficheiros con 5 adicións e 10 borrados
  1. 3 8
      src/components/Layout/components/layoutTags/index.vue
  2. 2 2
      vite.config.js

+ 3 - 8
src/components/Layout/components/layoutTags/index.vue

@@ -59,14 +59,14 @@ watch(
         // 更新 tags
         tags.value = val;
     },
-    { immediate: true,deep: true }
+    { immediate: true, deep: true }
 );
 
 watch(
     () => route,
     (val) => {
         activeKey.value = val.name
-    }, { immediate: true ,deep: true })
+    }, { immediate: true, deep: true })
 
 
 
@@ -89,12 +89,7 @@ const handelItemSetting = (val) => {
             })
             break;
         case 2:
-            routerTagData.tagData = []
-            localStorage.removeItem('RouterTagData')
-            routerTagData.getDefault('home')
-            router.push({
-                path: '/'
-            })
+            routerTagData.tagData = routerTagData.tagData.filter(res => res.name == route.name)
             break;
     }
 }

+ 2 - 2
vite.config.js

@@ -61,9 +61,9 @@ export default defineConfig({
         hmr: true,
         proxy: {
             "/api": {
-                // target: "http://sim.nanodreamtech.com",
+                target: "http://sim.nanodreamtech.com",
                 // target: "http://127.0.0.1:3001",
-                target: "http://sim.ainets.net",
+                // target: "http://sim.ainets.net",
                 changeOrigin: true,
                 ws: true,
                 secure: true,