mirror of https://github.com/ElemeFE/element
fix input password type
parent
4f3dcd825e
commit
96ff5e1dc7
|
@ -13,6 +13,7 @@
|
||||||
<slot name="prepend"></slot>
|
<slot name="prepend"></slot>
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
|
v-if="type === 'text'"
|
||||||
class="el-input__inner"
|
class="el-input__inner"
|
||||||
v-model="currentValue"
|
v-model="currentValue"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -25,7 +26,24 @@
|
||||||
:minlength="minlength"
|
:minlength="minlength"
|
||||||
:autocomplete="autoComplete"
|
:autocomplete="autoComplete"
|
||||||
ref="input"
|
ref="input"
|
||||||
@focus="$emit('focus', currentValue)"
|
@focus="handleFocus"
|
||||||
|
@blur="handleBlur"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
v-if="type === 'password'"
|
||||||
|
class="el-input__inner"
|
||||||
|
v-model="currentValue"
|
||||||
|
type="password"
|
||||||
|
:name="name"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
:disabled="disabled"
|
||||||
|
:readonly="readonly"
|
||||||
|
:number="number"
|
||||||
|
:maxlength="maxlength"
|
||||||
|
:minlength="minlength"
|
||||||
|
:autocomplete="autoComplete"
|
||||||
|
ref="input"
|
||||||
|
@focus="handleFocus"
|
||||||
@blur="handleBlur"
|
@blur="handleBlur"
|
||||||
>
|
>
|
||||||
<!-- input 图标 -->
|
<!-- input 图标 -->
|
||||||
|
@ -49,7 +67,7 @@
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:maxlength="maxlength"
|
:maxlength="maxlength"
|
||||||
:minlength="minlength"
|
:minlength="minlength"
|
||||||
@focus="$emit('focus', currentValue)"
|
@focus="handleFocus"
|
||||||
@blur="handleBlur">
|
@blur="handleBlur">
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
@ -130,6 +148,9 @@
|
||||||
const minRows = autosize ? autosize.minRows : null;
|
const minRows = autosize ? autosize.minRows : null;
|
||||||
const maxRows = autosize ? autosize.maxRows : null;
|
const maxRows = autosize ? autosize.maxRows : null;
|
||||||
this.textareaStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
|
this.textareaStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
|
||||||
|
},
|
||||||
|
handleFocus(ev) {
|
||||||
|
this.$emit('focus', ev);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue