vue-modally
modal
Installation
yarn add vue-modally
How to use
Include plugin in your main.js file.
import Modally from 'vue-modally'
Vue.use(Modally)
/*
you can provide default options like this:
Example:
Vue.use(Modally, { width: 900, padding: 20 });
Put Vue-Modally's Root component in your App.vue
<template>
<div id="app">
...
<router-view />
<VModalsComponent></VModalsComponent>//here
...
</div>
</template>
...
Open a modal
Example below shows how to evoke a modal using Vue component
your template
<template>
<button @click="openModal">Open my modal</button>
</template>
Your javascript
import MyModal from "./MyModal.vue"; //import your Vue component
export default {
created() {},
methods: {
openModal() {
this.$vmodal.show(MyModal, {
props: { name: "wale", company: "macroware" }, // you have access to this props in MyModal compoent
options: { width: 500 }
});
}
}
};
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.60.0 | ^2.6.10 | ||
| 2.50.0 | ^2.6.10 | ||
| 2.40.0 | ^2.6.10 | ||
| 2.30.0 | ^2.6.10 | ||
| 2.20.0 | ^2.6.10 | ||
| 2.10.0 | ^2.6.10 | ||
| 2.8.0 | ^2.6.10 | ||
| 2.7.0 | ^2.6.10 | ||
| 2.4.0 | ^2.6.10 | ||
| 2.3.0 | ^2.6.10 | ||
| 2.2.0 | ^2.6.10 | ||
| 2.1.0 | ^2.6.10 | ||
| 2.0.0 | ^2.6.10 | ||
| 1.9.7 | ^2.6.10 | ||
| 1.5.7 | ^2.6.10 | ||
| 1.5.5 | ^2.6.10 | ||
| 1.1.5 | ^2.6.10 | ||
| 1.0.5 | ^2.6.10 | ||
| 0.5.5 | ^2.6.10 | ||
| 0.5.4 | ^2.6.10 | ||
| 0.5.1 | ^2.6.10 | ||
| 0.5.0 | ^2.6.10 | ||
| 0.3.0 | ^2.6.10 | ||
| 0.2.0 | ^2.6.10 | ||
| 0.1.3 | ^2.6.10 | ||
| 0.1.2 | ^2.6.10 | ||
| 0.1.1 | ^2.6.10 | ||
| 0.1.0 | ^2.6.10 |