<div id="app"> <ul> <li v-for="i in [1,2,3,4]"> <c1 :item="i"> <p>{{ i }}</p> </c1> </li> </ul> </div> <template id="c1"> <div> <button type="button" @click="open=!open">{{ open ? 'hide' : 'show' }}</button> <div v-show="open"> <slot></slot> </div> </div> </template> <script src="http://cdn.bootcss.com/vue/2.0.3/vue.js"></script> <script> 'use strict'; Vue.component('c1', { template: '#c1', data() { return { open: true } } }) new Vue({ el: '#app' }) </script>