You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
445 B
25 lines
445 B
import{
|
|
defineStore
|
|
}from "pinia";
|
|
|
|
export const userStore=defineStore('user',{
|
|
state:()=>{
|
|
return{
|
|
loginState:false
|
|
}
|
|
},
|
|
getters:{},
|
|
actions:{
|
|
setLoginState(state){
|
|
this.$disposeloginState=state
|
|
}
|
|
},
|
|
persist:{
|
|
enabled:true,
|
|
strategies:[{
|
|
key:'user',
|
|
Storage:localStorage,
|
|
paths:['loginState']
|
|
}]
|
|
}
|
|
}) |