0👍
this works for me in a vue-cli simple environment
and its works fine, tested
main.js
import App from "./App.vue";
import Vue from "vue";
import VModal from "vue-js-modal";
Vue.use(VModal);
Vue.config.productionTip = false;
new Vue({
render: h => h(App)
}).$mount("#app");
App.vue
<template>
<div id="app">
<h3>Hello world test</h3>
<modal name="hello-world">
hello, world!
</modal>
<button @click="showModal">show modal</button>
</div>
</template>
<script>
export default {
methods: {
showModal() {
this.$modal.show("hello-world");
}
}
};
</script>
<style lang="scss">
</style>
- [Vuejs]-How to use a Vuex store to handle changes during a session?
- [Vuejs]-On iPhone when I take vertical picture my vue component is not works correctly
Source:stackexchange.com