feat: 新增 menu 组件 collapseTransition 属性
This commit is contained in:
parent
9c4cebcbd2
commit
fe80ad3428
@ -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);
|
||||
|
@ -29,7 +29,7 @@ const props = withDefaults(defineProps<LayMenuProps>(), {
|
||||
inverted: false,
|
||||
level: false,
|
||||
collapse: false,
|
||||
collapseTransition: true
|
||||
collapseTransition: true,
|
||||
});
|
||||
|
||||
let oldOpenKeys = ref<string[]>([]);
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user