mirror of https://github.com/ElemeFE/element
Select: fix icon and input click (#1253)
parent
2d5bc59c67
commit
24c5ff8c4c
|
@ -40,6 +40,8 @@
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:readonly="!filterable || multiple"
|
:readonly="!filterable || multiple"
|
||||||
@focus="toggleMenu"
|
@focus="toggleMenu"
|
||||||
|
@click="toggleMenu"
|
||||||
|
@mousedown.native="handleMouseDown"
|
||||||
@keyup.native="debouncedOnInputChange"
|
@keyup.native="debouncedOnInputChange"
|
||||||
@keydown.native.down.prevent="navigateOptions('next')"
|
@keydown.native.down.prevent="navigateOptions('next')"
|
||||||
@keydown.native.up.prevent="navigateOptions('prev')"
|
@keydown.native.up.prevent="navigateOptions('prev')"
|
||||||
|
@ -326,6 +328,14 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
handleMouseDown(event) {
|
||||||
|
if (event.target.tagName !== 'INPUT') return;
|
||||||
|
if (this.visible) {
|
||||||
|
this.handleClose();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
doDestroy() {
|
doDestroy() {
|
||||||
this.$refs.popper.doDestroy();
|
this.$refs.popper.doDestroy();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue