Commit 24c5ff8c authored by 杨奕's avatar 杨奕 Committed by FuryBean

Select: fix icon and input click (#1253)

parent 2d5bc59c
......@@ -40,6 +40,8 @@
:disabled="disabled"
:readonly="!filterable || multiple"
@focus="toggleMenu"
@click="toggleMenu"
@mousedown.native="handleMouseDown"
@keyup.native="debouncedOnInputChange"
@keydown.native.down.prevent="navigateOptions('next')"
@keydown.native.up.prevent="navigateOptions('prev')"
......@@ -326,6 +328,14 @@
},
methods: {
handleMouseDown(event) {
if (event.target.tagName !== 'INPUT') return;
if (this.visible) {
this.handleClose();
event.preventDefault();
}
},
doDestroy() {
this.$refs.popper.doDestroy();
},
......
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