refactor: Separate store
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { createApp } from 'vue';
|
||||
|
||||
import { useAccessDirective } from '@vben/access';
|
||||
import { registerAccessDirective } from '@vben/access';
|
||||
import { initStores } from '@vben/stores';
|
||||
import '@vben/styles';
|
||||
import '@vben/styles/antd';
|
||||
|
||||
import { setupI18n } from '#/locales';
|
||||
import { setupStore } from '#/store';
|
||||
|
||||
import App from './app.vue';
|
||||
import { router } from './router';
|
||||
@@ -17,10 +17,10 @@ async function bootstrap(namespace: string) {
|
||||
await setupI18n(app);
|
||||
|
||||
// 配置 pinia-tore
|
||||
await setupStore(app, { namespace });
|
||||
await initStores(app, { namespace });
|
||||
|
||||
// 安装权限指令
|
||||
useAccessDirective(app);
|
||||
registerAccessDirective(app);
|
||||
|
||||
// 配置路由及路由守卫
|
||||
app.use(router);
|
||||
|
Reference in New Issue
Block a user