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 }">
<a-tooltip
:content="item[props.labelKey || 'label']"
:mouse-enter-delay="300"
:disabled="!item[props.labelKey || 'label']"
>
<div class="w-full" @click.stop="checkItem(item.value)"> <div class="w-full" @click.stop="checkItem(item.value)">
<a-checkbox <a-checkbox
:model-value="checkedList.includes(item.value)" :model-value="checkedList.includes(item.value)"
:value="item.value" :value="item.value"
@click.stop="checkItem(item.value)" @click.stop="checkItem(item.value)"
> >
<a-tooltip <div class="one-line-text max-w-[120px]">
:content="item[props.labelKey || 'label']"
:mouse-enter-delay="300"
:disabled="!item[props.labelKey || 'label']"
>
<div class="one-line-text max-w-[120px]" @click.stop="checkItem(item.value)">
{{ 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();