Vodal

带有动画的 vue 模态。「A vue modal with animations.」

Github星跟踪图

Vodal Dependency Status NPM downloads

A vue modal with animations.
Example

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

Property Type Default Description
width number 400 width of dialog
height number 240 height of dialog
measure string px measure of width and height
show bool false whether to show dialog
mask bool true whether to show mask
closeButton bool true whether to show close button
closeOnEsc bool false whether close dialog when esc pressed
closeOnClickMask bool true whether close dialog when mask clicked
animation string zoom animation type
duration number 300 animation duration
className string / className for the container
customStyles object / custom dialog styles
customMaskStyles object / custom mask styles

Event

Name Description
hide triggers when dialog will hide
clickMask triggers when mask clicked

Animation Types

  • zoom
  • fade
  • flip
  • door
  • rotate
  • slideUp
  • slideDown
  • slideLeft
  • slideRight

Other

React version

主要指标

概览
名称与所有者chenjiahan/vodal
主编程语言CSS
编程语言HTML (语言数: 5)
平台
许可证MIT License
所有者活动
创建于2017-01-16 11:11:49
推送于2024-03-28 17:38:03
最后一次提交2024-01-10 10:14:38
发布数7
最新版本名称2.3.3 (发布于 )
第一版名称1.0.2 (发布于 )
用户参与
星数380
关注者数11
派生数58
提交数70
已启用问题?
问题数17
打开的问题数4
拉请求数39
打开的拉请求数4
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?