feat: fixed the regression of changing Menu to MenuUI

pull/355/head^2
Harold Zhang 2026-06-04 11:46:53 +08:00
parent 790e114d41
commit 6b7cb7b1fc
5 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
---
"@vben/styles": patch
"@vben-core/form-ui": patch
"@vben/web-naive": patch
'@vben/styles': patch
'@vben-core/form-ui': patch
'@vben/web-naive': patch
---
feat(@core/form-ui): 新增 useVbenForm 数组编辑器 VbenFormFieldArray

View File

@ -37,7 +37,7 @@ const menuIcon = computed(() =>
const isHttp = computed(() => isHttpUrl(item.parentPaths.at(-1)));
const isTopLevelMenuItem = computed(
() => parentMenu.value?.type.name === 'Menu',
() => parentMenu.value?.type.name === 'MenuUI',
);
const collapseShowTitle = computed(

View File

@ -54,7 +54,7 @@ const opened = computed(() => {
return rootMenu?.openedMenus.includes(props.path);
});
const isTopLevelMenuSubmenu = computed(
() => parentMenu.value?.type.name === 'Menu',
() => parentMenu.value?.type.name === 'MenuUI',
);
const mode = computed(() => rootMenu?.props.mode ?? 'vertical');
const rounded = computed(() => rootMenu?.props.rounded);

View File

@ -42,7 +42,7 @@ function useSubMenuContext() {
if (!instance) {
throw new Error('instance is required');
}
const parentMenu = findComponentUpward(instance, ['Menu', 'SubMenu']);
const parentMenu = findComponentUpward(instance, ['MenuUI', 'SubMenu']);
const subMenu = inject(`subMenu:${parentMenu?.uid}`) as SubMenuProvider;
return subMenu;
}

View File

@ -16,7 +16,7 @@ function useMenu() {
const parentPaths = computed(() => {
let parent = instance.parent;
const paths: string[] = [instance.props.path as string];
while (parent?.type.name !== 'Menu') {
while (parent?.type.name !== 'MenuUI') {
if (parent?.props.path) {
paths.unshift(parent.props.path as string);
}
@ -27,7 +27,7 @@ function useMenu() {
});
const parentMenu = computed(() => {
return findComponentUpward(instance, ['Menu', 'SubMenu']);
return findComponentUpward(instance, ['MenuUI', 'SubMenu']);
});
return {