mirror of https://github.com/ElemeFE/element
Input: update input password (#14480)
* refactor: Refactor Input component * Update input.vue * Update input.vuepull/14488/head
parent
59c5506915
commit
969fdd264b
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue