diff --git a/src/components/input/input.vue b/src/components/input/input.vue
index ea87d7a8..0cbdf2ed 100644
--- a/src/components/input/input.vue
+++ b/src/components/input/input.vue
@@ -2,7 +2,7 @@
-
+
@@ -22,7 +22,7 @@
:type="currentType"
:class="inputClasses"
:placeholder="placeholder"
- :disabled="disabled"
+ :disabled="itemDisabled"
:maxlength="maxlength"
:readonly="readonly"
:name="name"
@@ -57,7 +57,7 @@
:class="textareaClasses"
:style="textareaStyles"
:placeholder="placeholder"
- :disabled="disabled"
+ :disabled="itemDisabled"
:rows="rows"
:maxlength="maxlength"
:readonly="readonly"
@@ -83,12 +83,13 @@
import { oneOf, findComponentUpward } from '../../utils/assist';
import calcTextareaHeight from '../../utils/calcTextareaHeight';
import Emitter from '../../mixins/emitter';
+ import mixinsForm from '../../mixins/form';
const prefixCls = 'ivu-input';
export default {
name: 'Input',
- mixins: [ Emitter ],
+ mixins: [ Emitter, mixinsForm ],
props: {
type: {
validator (value) {
@@ -247,7 +248,7 @@
`${prefixCls}`,
{
[`${prefixCls}-${this.size}`]: !!this.size,
- [`${prefixCls}-disabled`]: this.disabled,
+ [`${prefixCls}-disabled`]: this.itemDisabled,
[`${prefixCls}-with-prefix`]: this.showPrefix,
[`${prefixCls}-with-suffix`]: this.showSuffix || (this.search && this.enterButton === false)
}
@@ -257,7 +258,7 @@
return [
`${prefixCls}`,
{
- [`${prefixCls}-disabled`]: this.disabled
+ [`${prefixCls}-disabled`]: this.itemDisabled
}
];
},
@@ -362,12 +363,12 @@
this.$emit('on-clear');
},
handleSearch () {
- if (this.disabled) return false;
+ if (this.itemDisabled) return false;
this.$refs.input.focus();
this.$emit('on-search', this.currentValue);
},
handleToggleShowPassword () {
- if (this.disabled) return false;
+ if (this.itemDisabled) return false;
this.showPassword = !this.showPassword;
this.focus();
const len = this.currentValue.length;