Skip to content

Commit

Permalink
fix: 修复动态路由无效
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Aug 26, 2023
1 parent ae0628e commit 1452a1a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion src/store/modules/app.ts
Expand Up @@ -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布局
Expand Down
7 changes: 0 additions & 7 deletions src/views/Login/components/LoginForm.vue
Expand Up @@ -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) {
Expand Down

0 comments on commit 1452a1a

Please sign in to comment.