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",{ const useStore = defineStore("mon",{
state(){ state(){
return { return {
username: "乔文章" username: ""
} }
}, },
//触发动作
actions:{ actions:{
Update(username){ Update(username){
this.username = username this.username = username
} }
}, },
//持久化存储,默认存储全部的数据
persist: { persist: {
enabled: true, enabled: true,
strategies: [{ strategies: [{