2024-06-01 23:15:29 +08:00
|
|
|
import type { InitStoreOptions } from '@vben-core/stores';
|
|
|
|
|
|
|
|
import type { App } from 'vue';
|
|
|
|
|
2024-06-30 15:03:37 +08:00
|
|
|
import { initStore, useAccessStore, useTabbarStore } 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);
|
|
|
|
}
|
|
|
|
|
2024-06-30 15:03:37 +08:00
|
|
|
export { setupStore, useAccessStore, useTabbarStore };
|