Commit 969fdd26 authored by iamkun's avatar iamkun Committed by hetech

Input: update input password (#14480)

* refactor: Refactor Input component

* Update input.vue

* Update input.vue
parent 59c55069
......@@ -52,25 +52,18 @@
class="el-input__suffix"
v-if="$slots.suffix || suffixIcon || showClear || showPassword || validateState && needStatusIcon">
<span class="el-input__suffix-inner">
<template v-if="!showClear">
<template v-if="!showClear || !showPwdVisible">
<slot name="suffix"></slot>
<i class="el-input__icon"
v-if="suffixIcon"
:class="suffixIcon">
</i>
</template>
<i v-else
<i v-if="showClear"
class="el-input__icon el-icon-circle-close el-input__clear"
@click="clear"
></i>
<template v-if="!showVisible">
<slot name="suffix"></slot>
<i class="el-input__icon"
v-if="suffixIcon"
:class="suffixIcon">
</i>
</template>
<i v-else
<i v-if="showPwdVisible"
class="el-input__icon el-icon-view el-input__clear"
@click="handlePasswordVisible"
></i>
......@@ -224,7 +217,7 @@
this.nativeInputValue &&
(this.focused || this.hovering);
},
showVisible() {
showPwdVisible() {
return this.showPassword &&
!this.inputDisabled &&
!this.readonly &&
......
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