From 76a4781417a8f4246e334f9004848ba47dcf643c Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Tue, 24 Oct 2017 16:48:28 +0800 Subject: [PATCH] fixed #2128 --- examples/routers/tree.vue | 3 ++- src/components/tree/tree.vue | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/routers/tree.vue b/examples/routers/tree.vue index 41ebdcd..af32364 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 4395da3..6a885bc 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: { -- libgit2 0.21.4