zoukankan      html  css  js  c++  java
  • vue- 内置过渡动画

    内置的组件-transition

    • Props:

      • name - string,用于自动生成 CSS 过渡类名。例如:name: 'fade' 将自动拓展为 .fade-enter.fade-enter-active 等。默认类名为 "v"
      • appear - boolean,是否在初始渲染时使用过渡。默认为 false
      • css - boolean,是否使用 CSS 过渡类。默认为 true。如果设置为 false,将只通过组件事件触发注册的 JavaScript 钩子。
      • type - string,指定过渡事件类型,侦听过渡何时结束。有效值为 "transition" 和 "animation"。默认 Vue.js 将自动检测出持续时间长的为过渡事件类型。
      • mode - string,控制离开/进入过渡的时间序列。有效的模式有 "out-in" 和 "in-out";默认同时进行。
      • duration - number | { enter: number, leave: number } 指定过渡的持续时间。默认情况下,Vue 会等待过渡所在根元素的第一个 transitionend 或 animationend 事件。
      • enter-class - string
      • leave-class - string
      • appear-class - string
      • enter-to-class - string
      • leave-to-class - string
      • appear-to-class - string
      • enter-active-class - string
      • leave-active-class - string
      • appear-active-class - string
    • 事件:

      • before-enter
      • before-leave
      • before-appear
      • enter
      • leave
      • appear
      • after-enter
      • after-leave
      • after-appear
      • enter-cancelled
      • leave-cancelled (v-show only)
      • appear-cancelled

    <transition> 元素作为单个元素/组件的过渡效果。<transition> 只会把过渡效果应用到其包裹的内容上,而不会额外渲染 DOM 元素,也不会出现在可被检查的组件层级中。

    元素淡入方式

    ①el-fade-in-linear

    ②el-fade-in

    zoom 缩放

    ①el-zoom-in-center

    ②el-zoom-in-top

    ③el-zoom-in-bottom

    collapse 展开折叠

    ① el-collapse-transition

  • 相关阅读:
    http参数传递方式
    Api接口管理工具推荐
    IntelliJ IDEA 插件推荐
    spring服务器接收参数格式
    SSM框架的常用注解整理
    Java map 详解
    遍历Map集合四中方法
    bean对应mapper.xml字段
    Java简历与面试
    SQL的case when then else end语句的用法
  • 原文地址:https://www.cnblogs.com/Bluebells/p/15160814.html
Copyright © 2011-2022 走看看