fix: 修复表格filter打开后选择选项未点击确认bug

This commit is contained in:
xinxin.wu 2024-12-19 16:13:04 +08:00 committed by Craftsman
parent 93d6d488a5
commit 30d29b33c4
1 changed files with 18 additions and 14 deletions

View File

@ -62,23 +62,23 @@
}" }"
> >
<template #title="{ item }"> <template #title="{ item }">
<div class="w-full" @click.stop="checkItem(item.value)"> <a-tooltip
<a-checkbox :content="item[props.labelKey || 'label']"
:model-value="checkedList.includes(item.value)" :mouse-enter-delay="300"
:value="item.value" :disabled="!item[props.labelKey || 'label']"
@click.stop="checkItem(item.value)" >
> <div class="w-full" @click.stop="checkItem(item.value)">
<a-tooltip <a-checkbox
:content="item[props.labelKey || 'label']" :model-value="checkedList.includes(item.value)"
:mouse-enter-delay="300" :value="item.value"
:disabled="!item[props.labelKey || 'label']" @click.stop="checkItem(item.value)"
> >
<div class="one-line-text max-w-[120px]" @click.stop="checkItem(item.value)"> <div class="one-line-text max-w-[120px]">
{{ item.label }} {{ item.label }}
</div> </div>
</a-tooltip> </a-checkbox>
</a-checkbox> </div>
</div> </a-tooltip>
</template> </template>
</MsList> </MsList>
</a-spin> </a-spin>
@ -230,6 +230,10 @@
watch( watch(
() => visible.value, () => visible.value,
(val) => { (val) => {
//
if (isNoFilter.value) {
checkedList.value = [];
}
if (val && props.mode === 'remote') { if (val && props.mode === 'remote') {
filterKeyword.value = ''; filterKeyword.value = '';
initOptions(); initOptions();