|
@@ -12,6 +12,8 @@
|
|
|
<div class="el-input-group__prepend" v-if="$slots.prepend">
|
|
|
<slot name="prepend"></slot>
|
|
|
</div>
|
|
|
+ <!-- input 图标 -->
|
|
|
+ <i class="el-input__icon" :class="[icon ? 'el-icon-' + icon : '']" v-if="icon" @click="handleIconClick"></i>
|
|
|
<input
|
|
|
v-if="type !== 'textarea'"
|
|
|
class="el-input__inner"
|
|
@@ -30,8 +32,6 @@
|
|
|
@focus="handleFocus"
|
|
|
@blur="handleBlur"
|
|
|
>
|
|
|
- <!-- input 图标 -->
|
|
|
- <i class="el-input__icon" :class="[icon ? 'el-icon-' + icon : '']" v-if="icon"></i>
|
|
|
<i class="el-input__icon el-icon-loading" v-if="validating"></i>
|
|
|
<!-- 后置元素 -->
|
|
|
<div class="el-input-group__append" v-if="$slots.append">
|
|
@@ -138,6 +138,9 @@
|
|
|
},
|
|
|
handleInput(ev) {
|
|
|
this.currentValue = ev.target.value;
|
|
|
+ },
|
|
|
+ handleIconClick(ev) {
|
|
|
+ this.$emit('click', ev);
|
|
|
}
|
|
|
},
|
|
|
|