Skip to content

过渡

最基础的过渡组件,简单封装,配合了 animate.css

具体查看 /@/const/transition.ts 文件可以看到嵌入的 animate.css 的部分样式名称

INFO

无需引入,可直接使用

Props

名称类型默认值说明
nameValueOfTransitionNameConstfade过渡名称
mode'in-out' / 'out-in'out-invue 原生 transition 的 mode
groupbooleanfalse是否渲染为过渡组
appearbooleanfalsevue 原生 transition 的 appear
durationnumber/object'{ enter: 500, leave: 500 }'vue 原生 transition 的 duration

Usage

vue
<template>
  <w-transition name="fade-left" appear>
    <div v-show="show" />
  </w-transition>
</template>

基于 MIT 许可发布