fix: 修复动态路由无效

This commit is contained in:
kailong321200875 2023-08-27 07:42:15 +08:00
parent ae0628e3af
commit 1452a1afc7
2 changed files with 1 additions and 8 deletions

View File

@ -57,7 +57,7 @@ export const useAppStore = defineStore('app', {
fixedHeader: true, // 固定toolheader fixedHeader: true, // 固定toolheader
footer: true, // 显示页脚 footer: true, // 显示页脚
greyMode: false, // 是否开始灰色模式,用于特殊悼念日 greyMode: false, // 是否开始灰色模式,用于特殊悼念日
dynamicRouter: getStorage('dynamicRouter') || false, // 是否动态路由 dynamicRouter: getStorage('dynamicRouter') || true, // 是否动态路由
fixedMenu: getStorage('fixedMenu') || false, // 是否固定菜单 fixedMenu: getStorage('fixedMenu') || false, // 是否固定菜单
layout: getStorage('layout') || 'classic', // layout布局 layout: getStorage('layout') || 'classic', // layout布局

View File

@ -205,13 +205,6 @@ watch(
// //
const signIn = async () => { 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() const formRef = await getElFormExpose()
await formRef?.validate(async (isValid) => { await formRef?.validate(async (isValid) => {
if (isValid) { if (isValid) {