You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
430 B
JavaScript

/**
* 通用数据仓库
*/
export const useLocalStore = defineStore('localStore', {
state: () => {
return {
test: undefined,
loginBg:true,
}
},
//计算字段
getters: {
},
//方法
actions: {
},
persist: {
enabled: true, // 开启缓存 默认会存储在本地localStorage
strategies: [
{
key: 'localStore',
storage: localStorage,
},
]
}
})