forked from github/dataease
fix(查询组件): 过滤组件设置默认值清除默认值后依然存留数值
This commit is contained in:
parent
9cf47cac1c
commit
cdba09d38d
@ -697,6 +697,21 @@ const setParameters = field => {
|
||||
curComponent.value.optionValueSource = 1
|
||||
}
|
||||
}
|
||||
if (curComponent.value.displayType === '22') {
|
||||
const isNumParameter = curComponent.value.checkedFields.some(ele => {
|
||||
return curComponent.value.parameters?.some(
|
||||
itx => [2, 3].includes(itx.deType) && curComponent.value.checkedFieldsMap[ele] === itx.id
|
||||
)
|
||||
})
|
||||
|
||||
const isSingle = curComponent.value.checkedFields.every(id => {
|
||||
return !curComponent.value.checkedFieldsMapArr?.[id]?.length
|
||||
})
|
||||
|
||||
if (isSingle && isNumParameter) {
|
||||
curComponent.value.displayType = '2'
|
||||
}
|
||||
}
|
||||
setTypeChange()
|
||||
})
|
||||
setType()
|
||||
|
@ -79,6 +79,7 @@ const maxDate = new Date('2100/1/1')
|
||||
watch(
|
||||
() => config.value.defaultValue,
|
||||
val => {
|
||||
if (props.isConfig) return
|
||||
const isMultiple = config.value.displayType === '7'
|
||||
if (isMultiple) {
|
||||
multiple.value = isMultiple
|
||||
|
Loading…
Reference in New Issue
Block a user