diff --git a/examples/routers/tree.vue b/examples/routers/tree.vue index 41ebdcd8..af323643 100644 --- a/examples/routers/tree.vue +++ b/examples/routers/tree.vue @@ -39,7 +39,8 @@ render: (h) => { return h('Button', { props: { - type: 'primary' + type: 'primary', + size: 'small' }, on: { click: () => { diff --git a/src/components/tree/tree.vue b/src/components/tree/tree.vue index 4395da3c..6a885bc4 100644 --- a/src/components/tree/tree.vue +++ b/src/components/tree/tree.vue @@ -49,10 +49,13 @@ }; }, watch: { - data(){ - this.stateTree = this.data; - this.flatState = this.compileFlatState(); - this.rebuildTree(); + data: { + deep: true, + handler () { + this.stateTree = this.data; + this.flatState = this.compileFlatState(); + this.rebuildTree(); + } } }, computed: {