|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { computed, getCurrentInstance, nextTick, onMounted, provide, ref, watch, watchEffect } from 'vue' |
|
|
|
|
import type { SubMenuProvider } from './types' |
|
|
|
|
import { createSimpleRootMenuContext } from './useSimpleMenuContext' |
|
|
|
|
import { createSimpleRootMenuContext, type MenuEmitterEvents } from './useSimpleMenuContext' |
|
|
|
|
import { useDesign } from '@/hooks/web/useDesign' |
|
|
|
|
import { propTypes } from '@/utils/propTypes' |
|
|
|
|
import { mitt } from '@/utils/mitt' |
|
|
|
@ -28,14 +28,7 @@ const props = defineProps({
|
|
|
|
|
}) |
|
|
|
|
const emit = defineEmits(['select', 'open-change']) |
|
|
|
|
|
|
|
|
|
const rootMenuEmitter = mitt<{ |
|
|
|
|
'on-update-opened': (string | number)[] |
|
|
|
|
'on-menu-item-select': string | number |
|
|
|
|
'open-name-change': { |
|
|
|
|
name: string |
|
|
|
|
opened: boolean |
|
|
|
|
} |
|
|
|
|
}>() |
|
|
|
|
const rootMenuEmitter = mitt<MenuEmitterEvents>() |
|
|
|
|
const instance = getCurrentInstance() |
|
|
|
|
|
|
|
|
|
const currentActiveName = ref<string | number>('') |
|
|
|
|