diff --git a/src/components/tree/tree.vue b/src/components/tree/tree.vue index 6e78eb8..8fe870a 100644 --- a/src/components/tree/tree.vue +++ b/src/components/tree/tree.vue @@ -18,8 +18,8 @@ v-if="!item.isLeaf" v-show="item.expand" :class="expandCls(item)" - :value="item.children" - :name="item.name+'.'+index" + :data="item.children" + :name="name+'.'+index" :multiple="multiple" :show-checkbox="showCheckbox"> @@ -39,7 +39,7 @@ components: { Icon, Checkbox }, mixins: [ Emitter ], props: { - value: { + data: { type: Array, default () { return []; @@ -66,8 +66,7 @@ }, data () { return { - prefixCls: prefixCls, - data: this.value + prefixCls: prefixCls }; }, computed: { @@ -80,9 +79,6 @@ } }, watch: { - value (val) { - this.data = val; - }, data () { if (this.name === '0') { this.setKey(); diff --git a/test/routers/tree.vue b/test/routers/tree.vue index 39806a8..1cdd23a 100644 --- a/test/routers/tree.vue +++ b/test/routers/tree.vue @@ -1,5 +1,8 @@ -- libgit2 0.21.4