mirror of
https://gitee.com/myxzgzs/boyue-ui-admin-uniapp
synced 2025-08-08 16:32:44 +08:00
18 lines
355 B
TypeScript
18 lines
355 B
TypeScript
import { createPinia } from 'pinia'
|
|
import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化
|
|
|
|
const store = createPinia()
|
|
store.use(
|
|
createPersistedState({
|
|
storage: {
|
|
getItem: uni.getStorageSync,
|
|
setItem: uni.setStorageSync,
|
|
},
|
|
}),
|
|
)
|
|
|
|
export default store
|
|
|
|
// 模块统一导出
|
|
export * from './user'
|