Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin into warmflow

This commit is contained in:
dap
2025-01-10 14:24:43 +08:00
25 changed files with 354 additions and 178 deletions

View File

@@ -1,6 +1,7 @@
<script lang="ts" setup>
import type { UseResizeObserverReturn } from '@vueuse/core';
import type { VNodeArrayChildren } from 'vue';
import type { SetupContext, VNodeArrayChildren } from 'vue';
import type {
MenuItemClicked,
@@ -9,10 +10,6 @@ import type {
MenuProvider,
} from '../types';
import { useNamespace } from '@vben-core/composables';
import { Ellipsis } from '@vben-core/icons';
import { isHttpUrl } from '@vben-core/shared/utils';
import { useResizeObserver } from '@vueuse/core';
import {
computed,
nextTick,
@@ -24,6 +21,12 @@ import {
watchEffect,
} from 'vue';
import { useNamespace } from '@vben-core/composables';
import { Ellipsis } from '@vben-core/icons';
import { isHttpUrl } from '@vben-core/shared/utils';
import { useResizeObserver } from '@vueuse/core';
import {
createMenuContext,
createSubMenuContext,
@@ -52,7 +55,7 @@ const emit = defineEmits<{
const { b, is } = useNamespace('menu');
const menuStyle = useMenuStyle();
const slots = useSlots();
const slots: SetupContext['slots'] = useSlots();
const menu = ref<HTMLUListElement>();
const sliceIndex = ref(-1);
const openedMenus = ref<MenuProvider['openedMenus']>(