|
@@ -28,16 +28,9 @@ export const useUserStore = defineStore({
|
|
|
menuActions: getAction()
|
|
|
}),
|
|
|
getters: {
|
|
|
- getMenuActions(code) {
|
|
|
- console.log(code);
|
|
|
- // console.log(this.menuActions);
|
|
|
+ getMenuActions() {
|
|
|
if (this.menuActions && this.menuActions.length > 0) {
|
|
|
- const arr = JSON.parse(this.menuActions);
|
|
|
- console.log(arr);
|
|
|
- const tran = arr.find(i => i.menu_route == code) || {};
|
|
|
- console.log(tran);
|
|
|
- const { action } = tran ?? {};
|
|
|
- return action ?? [];
|
|
|
+ return JSON.parse(this.menuActions);
|
|
|
} else {
|
|
|
return [];
|
|
|
}
|