ソースを参照

Loading修改

dengrui 1 週間 前
コミット
fb781f4d5f

+ 1 - 1
src/components/FullLoading/index.vue

@@ -43,7 +43,7 @@
 
 <script setup lang="ts">
 import { ref } from "vue";
-const isShow = ref(true); //定位loading 的开关
+const isShow = ref(false); //定位loading 的开关
 
 const show = () => {
   isShow.value = true;

+ 0 - 1
src/layout/components/header.vue

@@ -21,7 +21,6 @@
       <el-space>
         <div
           style="
-            background-color: var(--ohos-box-bg);
             border-radius: 50%;
             display: flex;
             justify-content: center;

+ 3 - 0
src/plugins/permission.ts

@@ -6,12 +6,15 @@ import { useSettingsStore, useUserStore } from "@/store";
 
 export function setupPermission() {
   router.beforeEach(async (to, from, next) => {
+    console.log(to, from);
     const userStore = useUserStore();
     NProgress.start();
     const isShow = inject("isShow");
     const route = useRoute();
     if (to.fullPath.substr(0, 10) == "/pro-steps") {
       next();
+    } else {
+      isShow.value = true;
     }
     const hasToken = localStorage.getItem("token");
     if (hasToken) {