MultiVue for Vue.js
Use multiple vue apps of the same class on the same page.
Vue support
Supports only Vue >= 2
Installation
$ npm install vue-multivue --save
JS & Vue
// AwesomeComponent.vue<template> <div> <button @click="doSomethingCool"></button> </div></template> <script> export default { data () { return { isDoingSomethingCool: false } }, methods: { doSomethingCool () { this.isDoingSomethingCool = true; } } }</script>
// app.js;; '.my-app' components: AwesomeComponent ;
HTML
Now you can use your app with the .my-app
selector multiple times on a single page.
... ...