fix(@vben-core/menu-ui): fix horizontal layout top menu language switching issue(#4724) (#4777)

Co-authored-by: jackhoo_98 <jackhoo_98@foxmail.com>
pull/48/MERGE
jackhoo(胡彪) 2024-10-31 22:05:51 +08:00 committed by GitHub
parent 06ba7cb224
commit f78cc319ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,6 @@ const activePath = ref<MenuProvider['activePath']>(props.defaultActive);
const items = ref<MenuProvider['items']>({});
const subMenus = ref<MenuProvider['subMenus']>({});
const mouseInChild = ref(false);
const defaultSlots: VNodeArrayChildren = slots.default?.() ?? [];
const isMenuPopup = computed<MenuProvider['isMenuPopup']>(() => {
return (
@ -73,6 +72,9 @@ const isMenuPopup = computed<MenuProvider['isMenuPopup']>(() => {
});
const getSlot = computed(() => {
//
const defaultSlots: VNodeArrayChildren = slots.default?.() ?? [];
const originalSlot = flattedChildren(defaultSlots) as VNodeArrayChildren;
const slotDefault =
sliceIndex.value === -1