fix(menu): fix hideMenu not working close #338

This commit is contained in:
Vben
2021-03-09 23:39:21 +08:00
parent 53867a8461
commit 5b2fbfb6ce
4 changed files with 4 additions and 9 deletions

View File

@@ -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)) {

View File

@@ -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);