Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miaowing/vue-modal

A simple modal plugin for vue.js
https://github.com/miaowing/vue-modal

modal vue vue-modal vue-plugin

Last synced: 18 days ago
JSON representation

A simple modal plugin for vue.js

Awesome Lists containing this project

README

        

# vue-modal-plugin
#### Usage
```
npm install vue-modal-plugin --save
```

#### init modal
```javascript
var Vue = require('vue'),
VueModal = require('vue-modal-plugin');

// regist vue-modal plugin
Vue.use(VueModal);

// initial vue-modal
var modal = Vue.modal({
target: element // insert modal element into target element which is child element of target element.
template: template, // vue-modal template, type string.
data: {

},
methods:{

},
autoDestroy: false // when the value is true, you won't need to invoke destroy().
});
```

#### template
```html


```

#### open
```javascript
modal.open();
```

#### close
```javascript
modal.close();
```

####destroy
```javascript
modal.destroy();
```

#### update
```javascript
modal.udpate({
// data
})
```

####demo
https://miaowing.me/vue-modal/example/index.html