admin-vben5/apps/web-antd/src/store/index.ts

20 lines
451 B
TypeScript
Raw Normal View History

2024-06-01 23:15:29 +08:00
import type { InitStoreOptions } from '@vben-core/stores';
import type { App } from 'vue';
import { initStore } from '@vben-core/stores';
2024-06-08 19:49:06 +08:00
2024-06-01 23:15:29 +08:00
/**
* @zh_CN pinia
* @param app vue app
*/
async function setupStore(app: App, options: InitStoreOptions) {
const pinia = await initStore(options);
app.use(pinia);
}
export { setupStore };
export { useAccessStore } from './modules/access';
export { useAppStore } from './modules/app';