vue-wrap
v1.0.1
Published
VueJS directive to wrap children slots
Downloads
39
Readme
vue-wrap
VueJS directive to wrap children
Why
Because I wanted to wrap slots on the fly, but I couldn't. It's useful to wrap components over lists with <li>
and such.
How
- Install the directive :
npm install vue-wrap
- Include the directive :
require('vue-wrap')
- use the directive :
Vue.component('OrderedList', { template: : '<ol v-wrap:li><slot /></ol>' }) <App> <OrderedList> <Components v-for='item in items' id="item.id" /> </OrderedList> </App>