JSFiddle - React, Tailwind, and code Playground
by alekzonder
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/0.11.4/vue.js"></script>
<div id="test">
<a href="#" v-on="click: click">click</a>
<div v-el="gallery">
<div v-repeat="photo: photos">
<a href="{{photo.url}}">
<img src="{{photo.name}}"/>
</a>
</div>
</div>
</div>
JavaScript
var vm = new Vue({
el: '#test',
data: function () {
return {
photos: [{
url: 'test1',
name: 'test1'
}, {
url: 'test2',
name: 'test2'
}]
}
},
methods: {
click: function () {
this.$set('photos', []);
console.log(this.$$.gallery);
}
}
});