This commit is contained in:
qiangyanwen 2022-08-14 16:36:13 +08:00
parent 00a00161fa
commit 023b4e34f5
1 changed files with 3 additions and 1 deletions

View File

@ -3,14 +3,16 @@ import {defineStore} from "pinia";
const useStore = defineStore("mon",{
state(){
return {
username: "乔文章"
username: ""
}
},
//触发动作
actions:{
Update(username){
this.username = username
}
},
//持久化存储,默认存储全部的数据
persist: {
enabled: true,
strategies: [{