Merge pull request #9541 from dataease/pr@dev_st

fix(过滤组件): 修复空数据选中bug
This commit is contained in:
dataeaseShu 2024-05-08 17:02:37 +08:00 committed by GitHub
commit 1ce6247557
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,7 @@
:key-word="keyWord"
popper-class="coustom-de-select"
:class="{'disabled-close': !inDraw && selectFirst && element.options.attrs.multiple, 'show-required-tips': showRequiredTips}"
:list="(element.options.attrs.showEmpty ? [{ text: '空数据', id: '_empty_$'}, ...data] : data)"
:list="(element.options.attrs.showEmpty ? [{ text: '空数据', id: '_empty_$'}, ...data.filter(ele => ele.id !== '_empty_$')] : data)"
:flag="flag"
:is-config="isConfig"
:custom-style="customStyle"
@ -562,7 +562,7 @@ export default {
} else if (!Array.isArray(this.resetKeyWordsVal) && this.resetKeyWordsVal) {
tempData = [...new Set([this.resetKeyWordsVal, ...tempData])]
}
this.filterInvalidValue(this.element.options.attrs.showEmpty ? [...tempData, '_empty_$'] : tempData)
this.filterInvalidValue(tempData)
return tempData.map(item => {
return {
id: item,