页面调整

This commit is contained in:
2024-10-16 15:33:14 +08:00
parent 062a8f259f
commit 7c7e5c5f78
7 changed files with 57 additions and 46 deletions

View File

@@ -1,22 +1,22 @@
import { computed } from "vue";
import { useRoute } from "vue-router";
import { useAuthStore } from "@/stores/modules/auth";
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import { useAuthStore } from '@/stores/modules/auth'
/**
* @description 页面按钮权限
* */
export const useAuthButtons = () => {
const route = useRoute();
const authStore = useAuthStore();
const authButtons = authStore.authButtonListGet[route.name as string] || [];
const route = useRoute()
const authStore = useAuthStore()
const authButtons = authStore.authButtonListGet[route.name as string] || []
const BUTTONS = computed(() => {
let currentPageAuthButton: { [key: string]: boolean } = {}
authButtons.forEach(item => (currentPageAuthButton[item] = true))
// currentPageAuthButton.status = true
return currentPageAuthButton
})
const BUTTONS = computed(() => {
let currentPageAuthButton: { [key: string]: boolean } = {};
authButtons.forEach(item => (currentPageAuthButton[item] = true));
return currentPageAuthButton;
});
return {
BUTTONS
};
};
return {
BUTTONS,
}
}