Browse Source

重新加载路由

duy 3 months ago
parent
commit
4584b55adc
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/layout/index.vue

+ 4 - 0
src/layout/index.vue

@@ -95,6 +95,8 @@ watch(() => [useRoutes?.query?.layout, store.isLayout], ([layout, layout2]) => {
 //监听项目信息变化
 const isAppLoadings = ref(true)
 watch(() => isAppLoading.value, (res) => {
+ 
+    
     if (!website.localModel) {
         reloadRouter.value = res
         isAppLoadings.value = !res
@@ -102,9 +104,11 @@ watch(() => isAppLoading.value, (res) => {
         if (res) {
             setTimeout(() => {
                 isAppLoadings.value = false
+                reloadRouter.value = true // 添加这行
             }, 1000)
         } else {
             isAppLoadings.value = true
+            reloadRouter.value = false // 添加这行
         }
     }
 }, { immediate:true })