Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
toggle display children
  • Loading branch information
jshawl committed Feb 2, 2017
1 parent 9b4bc33 commit 8d5fcf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.html
Expand Up @@ -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>
Expand All @@ -41,7 +42,12 @@
props: ['file'],
methods: {
toggleExpand: function(){
console.log('togglin!')
this.isOpen = !this.isOpen
}
},
data: function(){
return {
isOpen: false
}
}
})
Expand Down

0 comments on commit 8d5fcf9

Please sign in to comment.