feat: 新增 menu 组件 collapseTransition 属性

This commit is contained in:
就眠儀式 2022-03-24 22:37:41 +08:00
parent 9c4cebcbd2
commit fe80ad3428
3 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,9 @@ const props = withDefaults(defineProps<LayCollapseItemProps>(), {
disabled: false,
});
const { accordion, activeValues, emit, collapseTransition } = inject("layCollapse") as any;
const { accordion, activeValues, emit, collapseTransition } = inject(
"layCollapse"
) as any;
let isShow = computed(() => {
return activeValues.value.includes(props.id);

View File

@ -29,7 +29,7 @@ const props = withDefaults(defineProps<LayMenuProps>(), {
inverted: false,
level: false,
collapse: false,
collapseTransition: true
collapseTransition: true,
});
let oldOpenKeys = ref<string[]>([]);

View File

@ -86,9 +86,7 @@ onBeforeUnmount(() => window.removeEventListener("resize", setPosition));
</script>
<template>
<li
class="layui-nav-item"
>
<li class="layui-nav-item">
<a href="javascript:void(0)" @click="openHandle()">
<i>
<slot v-if="slots.icon" name="icon"></slot>