vue模态框弹窗动画_带有动画的尼斯Vue模态

Vodal是一个带有动画效果的Vue模态组件,提供多种动画类型如zoom、fade、flip等。本文介绍了Vodal的安装、使用、属性、事件及详细动画类型。
摘要由CSDN通过智能技术生成

vue模态框弹窗动画

沃达尔 (Vodal)

A Nice vue modal with animations.

带有动画的尼斯vue模态。

安装 (Installation)

npm i -S vodal

用法 (Usage)

<vodal :show="show" animation="rotate" @hide="show = false">
    <div>A vue modal with animations.</div>
</vodal>
import Vue from 'vue';
import Vodal from 'vodal';

Vue.component(Vodal.name, Vodal);

export default {
  name: 'app',
    
  data() {
    return {
      show: false
    }
  }
}
// include animation styles
@import "vodal/common.css";
@import "vodal/rotate.css";

道具 (Props)

PropertyTypeDefaultDescription
widthnumber400width of dialog
heightnumber240height of dialog
measurestringpxmeasure of width and height
showboolfalsewhether to show dialog
maskbooltruewhether to show mask
closeButtonbooltruewhether to show close button
closeOnEscboolfalsewhether close dialog when esc pressed
closeOnClickMaskbooltruewhether close dialog when mask clicked
animationstringzoomanimation type
durationnumber300animation duration
classNamestring/className for the container
customStylesobject/custom dialog styles
customMaskStylesobject/custom mask styles
属性 类型 默认 描述
宽度 400 对话宽度
高度 240 对话高度
测量 像素 宽度和高度的度量
表演 布尔 是否显示对话框
面具 布尔 真正 是否戴面具
closeButton 布尔 真正 是否显示关闭按钮
closeOnEsc 布尔 按下esc时是否关闭对话框
closeOnClickMask 布尔 真正 单击蒙版时是否关闭对话框
动画 放大 动画类型
持续时间 300 动画时长
班级名称 / 容器的className
customStyles 目的 / 自定义对话框样式
customMaskStyles 目的 / 自定义蒙版样式

事件 (Event)

NameDescription
hidetriggers when dialog will hide
clickMasktriggers when mask clicked
名称 描述
隐藏 对话框隐藏时触发
clickMask 单击蒙版时触发

动画类型 (Animation Types)

  • zoom

    放大

  • fade

    褪色

  • flip

    翻转

  • door

  • rotate

    旋转

  • slideUp

    向上滑动

  • slideDown

    滑下

  • slideLeft

    slideLeft

  • slideRight

    向右滑动

作者 (Author)

chenjiahan

翻译自: https://vuejsexamples.com/a-nice-vue-modal-with-animations/

vue模态框弹窗动画

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值