fix: 产品页面完善,增加空白布局与布局切换

This commit is contained in:
Gsh
2025-06-26 00:35:13 +08:00
parent 695aaedfba
commit 0eb83fc930
9 changed files with 35 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ import { useNProgress } from '@vueuse/integrations/useNProgress';
import { createRouter, createWebHistory } from 'vue-router';
import { ROUTER_WHITE_LIST } from '@/config';
import { errorRouter, layoutRouter, staticRouter } from '@/routers/modules/staticRouter';
import { useUserStore } from '@/stores';
import { useDesignStore, useUserStore } from '@/stores';
const { start, done } = useNProgress(0, {
showSpinner: false,
@@ -28,6 +28,8 @@ router.beforeEach(
next: NavigationGuardNext,
) => {
const userStore = useUserStore();
const designStore = useDesignStore(); // 必须在守卫内部调用
designStore._setLayout(to.meta?.layout || 'vertical');
// 1、NProgress 开始
start();