https://github.com/drewjbartlett/vue-multivue
Use multiple Vue apps of the same class on the same page
https://github.com/drewjbartlett/vue-multivue
app components javascript multiple reusable vue vuejs
Last synced: about 1 month ago
JSON representation
Use multiple Vue apps of the same class on the same page
- Host: GitHub
- URL: https://github.com/drewjbartlett/vue-multivue
- Owner: drewjbartlett
- Created: 2017-07-11T20:44:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-06T23:30:51.000Z (almost 8 years ago)
- Last Synced: 2024-04-24T09:25:21.466Z (over 1 year ago)
- Topics: app, components, javascript, multiple, reusable, vue, vuejs
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 16
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-vue-zh - vue-multivue - 在同一页面上使用同一类的多个vue应用程序. (UI组件 / 杂)
- awesome-vue - vue-multivue - Use multiple vue apps of the same class on the same page. (Components & Libraries / UI Components)
- awesome-vue - vue-multivue ★14 - Use multiple vue apps of the same class on the same page. (UI Components / Miscellaneous)
- awesome-vue - vue-multivue - Use multiple Vue apps of the same class on the same page (UI Components [🔝](#readme))
- awesome-vue - vue-multivue - Use multiple vue apps of the same class on the same page. (UI Components / Miscellaneous)
README
# 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
```vue
// AwesomeComponent.vue
export default {
data () {
return {
isDoingSomethingCool: false
}
},
methods: {
doSomethingCool () {
this.isDoingSomethingCool = true;
}
}
}
```
```js
// app.js
import MultiVue from 'vue-multivue';
import AwesomeComponent from './Components/AwesomeComponent.vue';
new MultiVue('.my-app', {
components: {
AwesomeComponent
}
});
```
## HTML
Now you can use your app with the `.my-app` selector multiple times on a single page.
```html
...
...
```