Commit 58d12f77 authored by baiyaaaaa's avatar baiyaaaaa

fix input password type

parent 4f3dcd82
......@@ -13,6 +13,7 @@
<slot name="prepend"></slot>
</div>
<input
v-if="type === 'text'"
class="el-input__inner"
v-model="currentValue"
type="text"
......@@ -25,7 +26,24 @@
:minlength="minlength"
:autocomplete="autoComplete"
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"
>
<!-- input 图标 -->
......@@ -49,7 +67,7 @@
:rows="rows"
:maxlength="maxlength"
:minlength="minlength"
@focus="$emit('focus', currentValue)"
@focus="handleFocus"
@blur="handleBlur">
</textarea>
</div>
......@@ -130,6 +148,9 @@
const minRows = autosize ? autosize.minRows : null;
const maxRows = autosize ? autosize.maxRows : null;
this.textareaStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
},
handleFocus(ev) {
this.$emit('focus', ev);
}
},
......
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