Skip to content
Permalink
Browse files

toggle display children

  • Loading branch information...
jshawl committed Feb 2, 2017
1 parent 9b4bc33 commit 8d5fcf9c36d7288797c67d2341cad9e238ed2e51
Showing with 7 additions and 1 deletion.
  1. +7 −1 index.html
@@ -20,6 +20,7 @@
<script type="x-template" id='folder'>
<div v-on:click="toggleExpand()">
{{file.name}}/
<span v-if='isOpen'>show children</span>
</div>
</script>
<script>
@@ -41,7 +42,12 @@
props: ['file'],
methods: {
toggleExpand: function(){
console.log('togglin!')
this.isOpen = !this.isOpen
}
},
data: function(){
return {
isOpen: false
}
}
})

0 comments on commit 8d5fcf9

Please sign in to comment.
You can’t perform that action at this time.