mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-11-30 02:57:46 +08:00
优化pinia使用
This commit is contained in:
parent
cf99a3f066
commit
35fa45cd85
@ -1,3 +1,4 @@
|
||||
import pinia from '@/store'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
// 固定路由(默认路由)
|
||||
@ -98,7 +99,7 @@ let asyncRoutes = [
|
||||
import { setupLayouts } from 'virtual:generated-layouts'
|
||||
import generatedRoutes from 'virtual:generated-pages'
|
||||
|
||||
if (useSettingsStore(createPinia()).app.routeBaseOn === 'filesystem') {
|
||||
if (useSettingsStore(pinia).app.routeBaseOn === 'filesystem') {
|
||||
constantRoutes = generatedRoutes.filter(item => {
|
||||
return item.meta?.enabled !== false && item.meta?.constant === true
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user