Commit 76a4781417a8f4246e334f9004848ba47dcf643c
1 parent
9b24f1ab
fixed #2128
Showing
2 changed files
with
9 additions
and
5 deletions
Show diff stats
examples/routers/tree.vue
src/components/tree/tree.vue
| ... | ... | @@ -49,10 +49,13 @@ |
| 49 | 49 | }; |
| 50 | 50 | }, |
| 51 | 51 | watch: { |
| 52 | - data(){ | |
| 53 | - this.stateTree = this.data; | |
| 54 | - this.flatState = this.compileFlatState(); | |
| 55 | - this.rebuildTree(); | |
| 52 | + data: { | |
| 53 | + deep: true, | |
| 54 | + handler () { | |
| 55 | + this.stateTree = this.data; | |
| 56 | + this.flatState = this.compileFlatState(); | |
| 57 | + this.rebuildTree(); | |
| 58 | + } | |
| 56 | 59 | } |
| 57 | 60 | }, |
| 58 | 61 | computed: { | ... | ... |