Commit 76a4781417a8f4246e334f9004848ba47dcf643c

Authored by 梁灏
1 parent 9b24f1ab

fixed #2128

Showing 2 changed files with 9 additions and 5 deletions   Show diff stats
examples/routers/tree.vue
@@ -39,7 +39,8 @@ @@ -39,7 +39,8 @@
39 render: (h) => { 39 render: (h) => {
40 return h('Button', { 40 return h('Button', {
41 props: { 41 props: {
42 - type: 'primary' 42 + type: 'primary',
  43 + size: 'small'
43 }, 44 },
44 on: { 45 on: {
45 click: () => { 46 click: () => {
src/components/tree/tree.vue
@@ -49,10 +49,13 @@ @@ -49,10 +49,13 @@
49 }; 49 };
50 }, 50 },
51 watch: { 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 computed: { 61 computed: {