diff --git a/src/App.vue b/src/App.vue index 9f46e350..01efc353 100755 --- a/src/App.vue +++ b/src/App.vue @@ -6,9 +6,17 @@ import eventBus from './utils/eventBus' import Provider from './ui-provider/index.vue' import useSettingsStore from '@/store/modules/settings' +const route = useRoute() + const settingsStore = useSettingsStore() const { auth } = useAuth() +const isAuth = computed(() => { + return route.matched.every((item) => { + return auth(item.meta.auth ?? '') + }) +}) + // 侧边栏主导航当前实际宽度 const mainSidebarActualWidth = computed(() => { let actualWidth = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--g-main-sidebar-width')) @@ -61,13 +69,13 @@ import.meta.env.VITE_APP_DEBUG_TOOL === 'vconsole' && new VConsole()