Commit c14cb221 authored by baiyaaaaa's avatar baiyaaaaa

fix input native props

parent 718356a6
...@@ -22,10 +22,11 @@ ...@@ -22,10 +22,11 @@
:placeholder="placeholder" :placeholder="placeholder"
:disabled="disabled" :disabled="disabled"
:readonly="readonly" :readonly="readonly"
:number="number"
:maxlength="maxlength" :maxlength="maxlength"
:minlength="minlength" :minlength="minlength"
:autocomplete="autoComplete" :autocomplete="autoComplete"
:autofocus="autofocus"
:form="form"
:value="value" :value="value"
ref="input" ref="input"
@input="handleInput" @input="handleInput"
...@@ -49,6 +50,8 @@ ...@@ -49,6 +50,8 @@
:style="textareaStyle" :style="textareaStyle"
:readonly="readonly" :readonly="readonly"
:rows="rows" :rows="rows"
:form="form"
:autofocus="autofocus"
:maxlength="maxlength" :maxlength="maxlength"
:minlength="minlength" :minlength="minlength"
@focus="handleFocus" @focus="handleFocus"
...@@ -67,38 +70,17 @@ ...@@ -67,38 +70,17 @@
props: { props: {
value: [String, Number], value: [String, Number],
placeholder: { placeholder: String,
type: String, size: String,
default: '' readonly: Boolean,
}, autofocus: Boolean,
size: { icon: String,
type: String, disabled: Boolean,
default: ''
},
readonly: {
type: Boolean,
default: false
},
icon: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
type: { type: {
type: String, type: String,
default: 'text' default: 'text'
}, },
name: { name: String,
type: String,
default: ''
},
number: {
type: Boolean,
default: false
},
autosize: { autosize: {
type: [Boolean, Object], type: [Boolean, Object],
default: false default: false
...@@ -111,13 +93,14 @@ ...@@ -111,13 +93,14 @@
type: String, type: String,
default: 'off' default: 'off'
}, },
form: String,
maxlength: Number, maxlength: Number,
minlength: Number minlength: Number
}, },
methods: { methods: {
handleBlur(event) { handleBlur(event) {
this.$emit('onblur', this.currentValue); this.$emit('blur', this.currentValue);
this.dispatch('form-item', 'el.form.blur', [this.currentValue]); this.dispatch('form-item', 'el.form.blur', [this.currentValue]);
}, },
inputSelect() { inputSelect() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment