-
collapseTransition
上下伸缩动画的Vue组件
<template>
<collapse-transition>
<!-- 把你的组件放进来在这里 -->
<!-- Put your components in here -->
<div v-show="visible" class="demo">
<button class="pullup" @click="visible = false">收起</button>
</div>
</collapse-transition>
</template>
<script>
import { collapseTransition } from 'si-ui';
export default {
components: { collapseTransition },
data() {
return {
visible: false
}
}
}
</script>
<style>
.demo {
height: 300px;
background-color: pink;
}
</style>
包含的组件必须具有v-if
或者v-else
否则不会生效!
The contained component must have v-if
or v-else
, otherwise it will not take effect!