1<template> 2 <div class="box"> 3 <h1 class="title">Clip-Scroll Tree <a :disabled="disabled" v-on:click="fetch" class="button is-info">Refresh</a></h1> 4 <hr/> 5 <div> 6 <ul> 7 <app-treeview :model=clip_scroll_tree></app-treeview> 8 </ul> 9 </div> 10 </div> 11</template> 12 13<script> 14import TreeView from './TreeView.vue' 15 16export default { 17 components: { 18 'app-treeview': TreeView, 19 }, 20 methods: { 21 fetch: function() { 22 this.$store.dispatch('sendMessage', "fetch_clip_scroll_tree"); 23 } 24 }, 25 computed: { 26 disabled() { 27 return !this.$store.state.connected 28 }, 29 clip_scroll_tree() { 30 return this.$store.state.clip_scroll_tree 31 } 32 }, 33} 34</script> 35 36<style> 37</style> 38