mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 04:51:43 +08:00
fix(查询组件): 过滤组件默认值”首项“搭配行权限使用时,会使得过滤组件失效
This commit is contained in:
committed by
xuwei-fit2cloud
parent
1961fd07a8
commit
431fa818c1
@@ -600,7 +600,6 @@ const reRenderAll = (oldArr, newArr) => {
|
||||
}, [])
|
||||
if (!emitterList.length) return
|
||||
emitterList.forEach(ele => {
|
||||
console.log('`query-data-${ele}`', `query-data-${ele}`)
|
||||
emitter.emit(`query-data-${ele}`)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ const placeholderText = computed(() => {
|
||||
const cascade = computed(() => {
|
||||
return cascadeList() || []
|
||||
})
|
||||
|
||||
let time
|
||||
const disabledFirstItem = computed(() => {
|
||||
const { defaultValueFirstItem, optionValueSource, multiple } = props.config
|
||||
return defaultValueFirstItem && optionValueSource === 1 && !multiple
|
||||
@@ -126,6 +126,7 @@ const setDefaultMapValue = arr => {
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
clearTimeout(time)
|
||||
enumValueArr = []
|
||||
})
|
||||
|
||||
@@ -219,6 +220,12 @@ const handleValueChange = () => {
|
||||
setCascadeValueBack(config.value.mapValue)
|
||||
emitCascade()
|
||||
nextTick(() => {
|
||||
console.log(
|
||||
'disabledFirstItem.value',
|
||||
disabledFirstItem.value,
|
||||
selectValue.value,
|
||||
cloneDeep(config.value)
|
||||
)
|
||||
isConfirmSearch(config.value.id, disabledFirstItem.value)
|
||||
})
|
||||
return
|
||||
@@ -373,7 +380,10 @@ const handleFieldIdChange = (val: EnumValue) => {
|
||||
}
|
||||
|
||||
if (disabledFirstItem.value) {
|
||||
setDefaultValueFirstItem()
|
||||
time = setTimeout(() => {
|
||||
clearTimeout(time)
|
||||
setDefaultValueFirstItem()
|
||||
}, 300)
|
||||
}
|
||||
|
||||
isFromRemote.value = false
|
||||
|
||||
Reference in New Issue
Block a user