mirror of https://github.com/ElemeFE/element
fix:issue #22424
parent
f14b5ba540
commit
2279715d10
File diff suppressed because it is too large
Load Diff
|
@ -98,7 +98,7 @@
|
|||
<slot name="prefix"></slot>
|
||||
</template>
|
||||
<template slot="suffix">
|
||||
<i v-show="!showClose" :class="['el-select__caret', 'el-input__icon', 'el-icon-' + iconClass]"></i>
|
||||
<i v-show="!showClose" :class="['el-select__caret', 'el-input__icon', 'el-icon-' + iconClass]" @click="handleClickArrow"></i>
|
||||
<i v-if="showClose" class="el-select__caret el-input__icon el-icon-circle-close" @click="handleClearClick"></i>
|
||||
</template>
|
||||
</el-input>
|
||||
|
@ -604,6 +604,16 @@
|
|||
this.deleteSelected(event);
|
||||
},
|
||||
|
||||
// #22424
|
||||
handleClickArrow(event) {
|
||||
if (this.elFormItem && this.elFormItem.$slots.label) {
|
||||
// 避免elFormItem存在slot为label时执行两次
|
||||
event.stopPropagation();
|
||||
// 强制更新,促使watch的visible执行一边
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
|
||||
doDestroy() {
|
||||
this.$refs.popper && this.$refs.popper.doDestroy();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue