1 parent 9b4bc33 commit 8d5fcf9Copy full SHA for 8d5fcf9
1 file changed
index.html
@@ -20,6 +20,7 @@
20
<script type="x-template" id='folder'>
21
<div v-on:click="toggleExpand()">
22
{{file.name}}/
23
+ <span v-if='isOpen'>show children</span>
24
</div>
25
</script>
26
<script>
@@ -41,7 +42,12 @@
41
42
props: ['file'],
43
methods: {
44
toggleExpand: function(){
- console.log('togglin!')
45
+ this.isOpen = !this.isOpen
46
+ }
47
+ },
48
+ data: function(){
49
+ return {
50
+ isOpen: false
51
}
52
53
})
0 commit comments