vue-pro/yudao-ui-admin-vue3/src/store/index.ts

14 lines
270 B
TypeScript
Raw Normal View History

2022-07-18 19:06:37 +08:00
import type { App } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'
const store = createPinia()
store.use(piniaPluginPersist)
export const setupStore = (app: App<Element>) => {
app.use(store)
}
export { store }