left menu 修正

This commit is contained in:
2024-02-03 11:55:44 +09:00
parent 3159366560
commit 8fecde4c42
4 changed files with 24 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ export interface IUserState{
token?:string;
returnUrl:string;
currentDomain:IDomainInfo;
LeftDrawer:boolean;
}
export const useAuthStore = defineStore({
@@ -20,10 +21,19 @@ export const useAuthStore = defineStore({
return {
token,
returnUrl: '',
LeftDrawer:false,
currentDomain: JSON.parse(localStorage.getItem('currentDomain')||"{}")
}
},
getters:{
toggleLeftDrawer():boolean{
return this.LeftDrawer;
}
},
actions: {
toggleLeftMenu(){
this.LeftDrawer=!this.LeftDrawer;
},
async login(username:string, password:string) {
const params = new URLSearchParams();
params.append('username', username);