mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 02:00:25 +08:00
fix(menu): fix hideMenu not working close #338
This commit is contained in:
parent
53867a8461
commit
5b2fbfb6ce
@ -36,9 +36,7 @@
|
||||
setup(props) {
|
||||
const { prefixCls } = useDesign('basic-menu-item');
|
||||
|
||||
const getShowMenu = computed(() => {
|
||||
return !props.item.meta?.hideMenu;
|
||||
});
|
||||
const getShowMenu = computed(() => !props.item.meta?.hideMenu);
|
||||
function menuHasChildren(menuTreeItem: MenuType): boolean {
|
||||
return (
|
||||
Reflect.has(menuTreeItem, 'children') &&
|
||||
|
@ -94,7 +94,7 @@
|
||||
listenerLastChangeTab((route) => {
|
||||
if (route.name === REDIRECT_NAME) return;
|
||||
|
||||
currentActiveMenu.value = route.meta?.currentActiveMenu;
|
||||
currentActiveMenu.value = route.meta?.currentActiveMenu as string;
|
||||
handleMenuChange(route);
|
||||
|
||||
if (unref(currentActiveMenu)) {
|
||||
|
@ -75,10 +75,7 @@
|
||||
const { t } = useI18n();
|
||||
const { prefixCls } = useDesign('simple-menu');
|
||||
|
||||
const getShowMenu = computed(() => {
|
||||
return !props.item?.hideMenu;
|
||||
});
|
||||
|
||||
const getShowMenu = computed(() => !props.item?.meta?.hideMenu);
|
||||
const getIcon = computed(() => props.item?.icon);
|
||||
const getI18nName = computed(() => t(props.item?.name));
|
||||
const getShowSubTitle = computed(() => !props.collapse || !props.parent);
|
||||
|
@ -92,7 +92,7 @@ const feat: AppRouteModule = {
|
||||
currentActiveMenu: '/feat/breadcrumb/children',
|
||||
title: t('routes.demo.feat.breadcrumbChildrenDetail'),
|
||||
hideTab: true,
|
||||
hideMenu: true,
|
||||
// hideMenu: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user