Corrections after review input
This commit is contained in:
parent
afef4ce7f7
commit
cf753854d1
2 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
<template>
|
||||
<li :class="classes" @click.stop="select"><slot>{{ showLabel }}</slot></li>
|
||||
<li
|
||||
:class="classes"
|
||||
@click.stop="select"
|
||||
@mousedown.prevent
|
||||
@touchstart.prevent
|
||||
><slot>{{ showLabel }}</slot></li>
|
||||
</template>
|
||||
<script>
|
||||
import Emitter from '../../mixins/emitter';
|
||||
|
|
|
@ -337,6 +337,7 @@
|
|||
},
|
||||
getOptionData(value){
|
||||
const option = this.flatOptions.find(({componentOptions}) => componentOptions.propsData.value === value);
|
||||
if (!option) return {};
|
||||
const textContent = option.componentOptions.children.reduce((str, child) => str + (child.text || ''), '');
|
||||
const label = option.componentOptions.propsData.label || textContent || '';
|
||||
return {
|
||||
|
@ -389,6 +390,7 @@
|
|||
this.visible = typeof force !== 'undefined' ? force : !this.visible;
|
||||
if (this.visible){
|
||||
this.dropDownWidth = this.$el.getBoundingClientRect().width;
|
||||
this.broadcast('Drop', 'on-update-popper');
|
||||
}
|
||||
},
|
||||
hideMenu () {
|
||||
|
@ -598,6 +600,9 @@
|
|||
if (topOverflowDistance < 0) {
|
||||
this.$refs.dropdown.$el.scrollTop += topOverflowDistance;
|
||||
}
|
||||
},
|
||||
dropVisible(open){
|
||||
this.broadcast('Drop', open ? 'on-update-popper' : 'on-destroy-popper');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue