mirror of https://github.com/ElemeFE/element
fix input native props
parent
718356a67e
commit
c14cb221cd
|
@ -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 @@
|
||||||
: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 @@
|
||||||
|
|
||||||
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 @@
|
||||||
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() {
|
||||||
|
|
Loading…
Reference in New Issue