refactor: Separate store

This commit is contained in:
vben
2024-07-30 21:10:28 +08:00
parent cf0ec053e4
commit 89dcf522f5
40 changed files with 338 additions and 345 deletions

View File

@@ -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);