清空表单

This commit is contained in:
zoujiandong
2023-07-17 17:22:34 +08:00
parent 245b2b2aec
commit 8b6bf6698c
3 changed files with 14 additions and 6 deletions
+6 -5
View File
@@ -51,16 +51,17 @@ export const usePermissionStore = defineStore('permisson', {
return routes;
},
async getMenuRole() {
const res = await getUserMenuRole();
this.setMenuList(res.data);
this.addRouters =await this.GenerateRoutes(res.data);
const {code,data,message}= await getUserMenuRole();
if(code==200){
this.setMenuList(data);
this.addRouters =await this.GenerateRoutes(data);
}
},
async getButtonRole() {
const {code,data,message} = await getUserButtonRole();
if(code==200){
this.buttonPermissions=data;
}else{
Message.error(message);
}
},
clearRouters(){