mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
fix(查询组件): 查询组件下拉框多选的时候,点击其他下拉框不会收起 #14162
This commit is contained in:
parent
7a4c90aaee
commit
08aeabf0e9
@ -592,6 +592,15 @@ const getOptionFromCascade = () => {
|
||||
selectValue.value = config.value.multiple ? [] : undefined
|
||||
debounceOptions(1)
|
||||
}
|
||||
const selectHideClick = id => {
|
||||
useEmitt().emitter.emit('select-hide_lick', id)
|
||||
}
|
||||
|
||||
const hideClick = id => {
|
||||
if (id === config.value.id) return
|
||||
const vnode = single.value || mult.value
|
||||
vnode?.handleClickOutside?.()
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
init()
|
||||
@ -599,6 +608,11 @@ onBeforeMount(() => {
|
||||
name: `${config.value.id}-select`,
|
||||
callback: getOptionFromCascade
|
||||
})
|
||||
|
||||
useEmitt({
|
||||
name: 'select-hide_lick',
|
||||
callback: hideClick
|
||||
})
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
@ -617,6 +631,7 @@ defineExpose({
|
||||
:placeholder="placeholderText"
|
||||
v-loading="loading"
|
||||
filterable
|
||||
@click="selectHideClick"
|
||||
@change="handleValueChange"
|
||||
:popper-class="
|
||||
visible ? 'load-select filter-select-popper_class' : 'filter-select-popper_class'
|
||||
@ -633,6 +648,7 @@ defineExpose({
|
||||
v-else
|
||||
v-model="selectValue"
|
||||
key="single"
|
||||
@click="selectHideClick"
|
||||
:placeholder="placeholderText"
|
||||
v-loading="loading"
|
||||
@change="handleValueChange"
|
||||
|
Loading…
Reference in New Issue
Block a user