fix: 修复动态路由无效
This commit is contained in:
parent
ae0628e3af
commit
1452a1afc7
|
@ -57,7 +57,7 @@ export const useAppStore = defineStore('app', {
|
|||
fixedHeader: true, // 固定toolheader
|
||||
footer: true, // 显示页脚
|
||||
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
|
||||
dynamicRouter: getStorage('dynamicRouter') || false, // 是否动态路由
|
||||
dynamicRouter: getStorage('dynamicRouter') || true, // 是否动态路由
|
||||
fixedMenu: getStorage('fixedMenu') || false, // 是否固定菜单
|
||||
|
||||
layout: getStorage('layout') || 'classic', // layout布局
|
||||
|
|
|
@ -205,13 +205,6 @@ watch(
|
|||
|
||||
// 登录
|
||||
const signIn = async () => {
|
||||
await permissionStore.generateRoutes('none').catch(() => {})
|
||||
permissionStore.getAddRouters.forEach((route) => {
|
||||
addRoute(route as RouteRecordRaw) // 动态添加可访问路由表
|
||||
})
|
||||
permissionStore.setIsAddRouters(true)
|
||||
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
||||
|
||||
const formRef = await getElFormExpose()
|
||||
await formRef?.validate(async (isValid) => {
|
||||
if (isValid) {
|
||||
|
|
Loading…
Reference in New Issue