From e6c0b158e9e86a4687da559fe7048b2aa0dcb73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Fri, 3 Mar 2017 10:35:38 +0800 Subject: [PATCH] update update --- src/components/checkbox/checkbox.vue | 7 +++++-- src/components/radio/radio.vue | 2 +- src/components/rate/rate.vue | 2 +- src/components/tree/tree.vue | 4 ++-- src/styles/components/tree.less | 2 +- test/routers/tree.vue | 25 +++++-------------------- 6 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue index bc652294..c9b18696 100644 --- a/src/components/checkbox/checkbox.vue +++ b/src/components/checkbox/checkbox.vue @@ -81,10 +81,13 @@ }, mounted () { // todo 使用 while向上查找 - if (this.$parent && this.$parent.$options.name === 'checkboxGroup') this.group = true; + if (this.$parent && this.$parent.$options.name === 'CheckboxGroup') this.group = true; if (!this.group) { this.updateModel(); - if (this.$refs.slot && this.$refs.slot.innerHTML === '') { +// if (this.$refs.slot && this.$refs.slot.innerHTML === '') { +// this.showSlot = false; +// } + if (this.$slots.default === undefined) { this.showSlot = false; } } diff --git a/src/components/radio/radio.vue b/src/components/radio/radio.vue index 8be2b46d..9ac207f0 100644 --- a/src/components/radio/radio.vue +++ b/src/components/radio/radio.vue @@ -64,7 +64,7 @@ }, mounted () { // todo 使用 while向上查找 - if (this.$parent && this.$parent.$options.name === 'radioGroup') this.group = true; + if (this.$parent && this.$parent.$options.name === 'RadioGroup') this.group = true; if (!this.group) { this.updateValue(); } diff --git a/src/components/rate/rate.vue b/src/components/rate/rate.vue index 4798e995..78543d7e 100644 --- a/src/components/rate/rate.vue +++ b/src/components/rate/rate.vue @@ -81,7 +81,7 @@ // }, currentValue: { immediate: true, - handler (val) { + handler () { this.setHalf(this.currentValue); } } diff --git a/src/components/tree/tree.vue b/src/components/tree/tree.vue index 50f6a499..67f7ad98 100644 --- a/src/components/tree/tree.vue +++ b/src/components/tree/tree.vue @@ -9,7 +9,7 @@ :value="item.checked && item.childrenCheckedStatus == 2" :disabled="item.disabled || item.disableCheckbox" :indeterminate="item.checked && item.childrenCheckedStatus == 1" - @click.prevent="setCheck(item.disabled||item.disableCheckbox, index)"> + @click.native.prevent="setCheck(item.disabled||item.disableCheckbox, index)"> @@ -181,7 +181,7 @@ this.dispatch('Tree', 'nodeSelected', { ori: this, selected: selected - }) + }); } }, setCheck (disabled, index) { diff --git a/src/styles/components/tree.less b/src/styles/components/tree.less index 936601d5..7e767234 100644 --- a/src/styles/components/tree.less +++ b/src/styles/components/tree.less @@ -91,7 +91,7 @@ transition: all @transition-time @ease-in-out; } &.@{tree-prefix-cls}-switcher-noop { - display: none; + //display: none; cursor: auto; i{ display: none; diff --git a/test/routers/tree.vue b/test/routers/tree.vue index 8cc9a511..39806a88 100644 --- a/test/routers/tree.vue +++ b/test/routers/tree.vue @@ -1,21 +1,13 @@