Vodal

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

Github stars Tracking Chart

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

Main metrics

Overview
Name With Ownerchenjiahan/vodal
Primary LanguageCSS
Program languageHTML (Language Count: 5)
Platform
License:MIT License
所有者活动
Created At2017-01-16 11:11:49
Pushed At2024-03-28 17:38:03
Last Commit At2024-01-10 10:14:38
Release Count7
Last Release Name2.3.3 (Posted on )
First Release Name1.0.2 (Posted on )
用户参与
Stargazers Count380
Watchers Count11
Fork Count58
Commits Count70
Has Issues Enabled
Issues Count17
Issue Open Count4
Pull Requests Count39
Pull Requests Open Count4
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private