Merge pull request #7427 from dataease/pr@dev@fix_selector_filter

fix: 下拉过滤器设置首项和必填删除过滤器视图未更新
This commit is contained in:
fit2cloud-chenyw 2023-12-28 10:23:28 +08:00 committed by GitHub
commit 497e85833d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,14 +362,16 @@ export default {
resetDefaultValue(ele) { resetDefaultValue(ele) {
const id = ele.id const id = ele.id
const eleVal = ele.options.value.toString() const eleVal = ele.options.value.toString()
if (this.inDraw && this.manualModify && this.element.id === id && this.value.toString() !== eleVal && this.defaultValueStr === eleVal) { if (this.inDraw && this.manualModify && this.element.id === id) {
if (this.selectFirst) { if (this.selectFirst) {
this.fillFirstValue() this.fillFirstValue()
this.firstChange(this.value) this.firstChange(this.value)
return return
} }
this.value = this.fillValueDerfault() if (this.value.toString() !== eleVal && this.defaultValueStr === eleVal) {
this.changeValue(this.value) this.value = this.fillValueDerfault()
this.changeValue(this.value)
}
} }
}, },
onBlur() { onBlur() {