Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakehamilton/vue-echo-children
Render multiple nodes in Vue
https://github.com/jakehamilton/vue-echo-children
component javascript npm-package vue
Last synced: about 5 hours ago
JSON representation
Render multiple nodes in Vue
- Host: GitHub
- URL: https://github.com/jakehamilton/vue-echo-children
- Owner: jakehamilton
- Created: 2018-05-07T19:55:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-07T19:56:13.000Z (over 6 years ago)
- Last Synced: 2024-10-07T11:21:21.031Z (about 1 month ago)
- Topics: component, javascript, npm-package, vue
- Language: JavaScript
- Homepage: https://www.npmjs.com/vue-echo-children
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
<vue-echo-children>> Render multiple nodes in Vue
## Installation
Via NPM:
```shell
npm install vue-echo-children
```Via UNPKG (browser):
```html
```
## Usage
### NPM Package
Global Install
```js
import Vue from 'vue'
import EchoChildren from 'vue-echo-children'Vue.use(EchoChildren)
```A La Carte
```js
import { EchoChildren } from 'vue-echo-children'const MyComponent = {
components: {
EchoChildren
},
template: '...'
}
```Vue Single File Component
```html
Multiple
Root
Nodes!
import { EchoChildren } from 'vue-echo-children'
export default {
components: {
EchoChildren
}
}```
### Browser
The `` component is installed globally by default. The library instance is located at `window.VueEchoChildren`.
Global Install (HTML)
```html
...
```Global Install (JS)
```js
// All you need to do is use the component
new Vue({
template: '..'
})
```Manual Usage (Global Install)
If the component failed to install to a global Vue instance, you can install it yourself.
```js
Vue.use(window.VueEchoChildren)
```Manual Usage (A La Carte)
If the component failed to install to a global Vue instance and you don't want a global install.
```js
// Get the Vue component
const { EchoChildren } = VueEchoChildren// es5
// var EchoChildren = VueEchoChildren.EchoChildren// When creating your Vue components, add this as a child component
new Vue({
components: {
EchoChildren // <--
}
})
```