|
|
|
@ -56,6 +56,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
import { type TimeoutHandle, type Recordable } from '@vben/types'; |
|
|
|
import type { CSSProperties, PropType } from 'vue'; |
|
|
|
import type { SubMenuProvider } from './types'; |
|
|
|
import { |
|
|
|
@ -77,7 +78,7 @@ |
|
|
|
import { Icon } from '/@/components/Icon'; |
|
|
|
import { Popover } from 'ant-design-vue'; |
|
|
|
import { isBoolean, isObject } from '/@/utils/is'; |
|
|
|
import mitt from '/@/utils/mitt'; |
|
|
|
import { mitt } from '/@/utils/mitt'; |
|
|
|
|
|
|
|
const DELAY = 200; |
|
|
|
export default defineComponent({ |
|
|
|
@ -267,14 +268,14 @@ |
|
|
|
|
|
|
|
rootMenuEmitter.on( |
|
|
|
'on-update-opened', |
|
|
|
(data: boolean | (string | number)[] | Recordable) => { |
|
|
|
(data: boolean | (string | number)[] | Recordable<any>) => { |
|
|
|
if (unref(getCollapse)) return; |
|
|
|
if (isBoolean(data)) { |
|
|
|
state.opened = data; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (isObject(data) && rootProps.accordion) { |
|
|
|
const { opend, parent, uidList } = data as Recordable; |
|
|
|
const { opend, parent, uidList } = data as Recordable<any>; |
|
|
|
if (parent === instance?.parent) { |
|
|
|
state.opened = opend; |
|
|
|
} else if (!uidList.includes(instance?.uid)) { |
|
|
|
|