diff --git a/src/components/input/input.vue b/src/components/input/input.vue index 36456b0..2d8498c 100644 --- a/src/components/input/input.vue +++ b/src/components/input/input.vue @@ -201,8 +201,6 @@ return { currentValue: this.value, prefixCls: prefixCls, - prepend: true, - append: true, slotReady: false, textareaStyles: {}, isOnComposition: false, @@ -216,6 +214,16 @@ if (type === 'password' && this.password && this.showPassword) type = 'text'; return type; }, + prepend () { + let state = false; + if (this.type !== 'textarea') state = this.$slots.prepend !== undefined; + return state; + }, + append () { + let state = false; + if (this.type !== 'textarea') state = this.$slots.append !== undefined; + return state; + }, showPrefix () { let state = false; if (this.type !== 'textarea') state = this.prefix !== '' || this.$slots.prefix !== undefined; @@ -414,13 +422,6 @@ } }, mounted () { - if (this.type !== 'textarea') { - this.prepend = this.$slots.prepend !== undefined; - this.append = this.$slots.append !== undefined; - } else { - this.prepend = false; - this.append = false; - } this.slotReady = true; this.resizeTextarea(); this.handleCalcIconOffset(); -- libgit2 0.21.4