feat: transition 新增 enable 属性, 用于开启关闭过渡
This commit is contained in:
parent
ce356012ce
commit
7b6854629b
@ -1,9 +1,12 @@
|
||||
<template>
|
||||
<LayCollapseTransition v-if="type === 'collapse'"
|
||||
><slot></slot
|
||||
></LayCollapseTransition>
|
||||
<template v-if="enable">
|
||||
<LayCollapseTransition v-if="type === 'collapse'"><slot></slot></LayCollapseTransition>
|
||||
<LayFadeTransition v-if="type === 'fade'"><slot></slot></LayFadeTransition>
|
||||
</template>
|
||||
<template v-else>
|
||||
<slot></slot>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
@ -17,9 +20,11 @@ import LayFadeTransition from "./fadeTransition.vue";
|
||||
|
||||
export interface LayTransitionProps {
|
||||
type?: string;
|
||||
enable?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<LayTransitionProps>(), {
|
||||
type: "collapse",
|
||||
enable: true
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user