@roylee1997/vue-js-modal
v0.1.35
Published
## Github Example ( In src folder ) https://github.com/1997roylee/vue-jg-modal
Downloads
1
Readme
vue-js-modal
Github Example ( In src folder )
https://github.com/1997roylee/vue-jg-modal
Npm
https://www.npmjs.com/package/@roylee1997/vue-js-modal
Command
For Install npm
$ npm i @roylee1997/vue-js-modal
In src folder, App.vue
$ npm install
$ npm run serve
Example
Setup:
import VueJsModal from "../projects/VueJsModal/index";
Vue.use(VueJsModal);
Usage:
<v-modal prevent name="Apple">
<div style="background-color: white;">
<div style="height: 200px;"></div>
<div class="bTn" @click="closeDialog">Close</div>
</div>
</v-modal>
Show & Hide Function:
showDialog() {
this.$VModal.show('Apple')
}
closeDialog() {
this.$VModal.hide('Apple')
}
Props
| Prop | Type | Comment | | ------ | ------ | ------ | | name | String | The identify of the Modal | | height | Number or String | Default auto | | width | Number | Default 500px | | maxHeight | Number | Default 500px | | minHeight | Number | Default 200px | | prevent | Boolean | If true, you only can use $VModal.hide to hide the dialog | | onShow | Function | When the Modal is show | | onClose | Function | When the Modal is hide |