fix: 修复移动端配置过滤组件查询条件部分样式不生效问题 (#18200)

This commit is contained in:
王嘉豪
2026-04-07 17:10:03 +08:00
committed by wangjiahao
parent f288b4bb37
commit e92a1ed4b9
3 changed files with 31 additions and 1 deletions

View File

@@ -561,6 +561,13 @@ export function initCanvasDataMobile(dvId, params, callBack) {
ele.style = mStyle || style
ele.events = mEvents || events
ele.commonBackground = mCommonBackground || commonBackground
if (ele.component === 'VQuery') {
ele.propValue?.forEach(queryItem => {
queryItem.placeholder = queryItem.mPlaceholder || queryItem.placeholder
queryItem.queryConditionWidth =
queryItem.mQueryConditionWidth || queryItem.queryConditionWidth
})
}
if (ele.component === 'DeTabs') {
ele.propValue?.forEach(tabItem => {
tabItem.componentData?.forEach(tabComponent => {

View File

@@ -149,6 +149,16 @@ const hanedleMessage = event => {
ele.mStyle = style
ele.mEvents = events
ele.mCommonBackground = commonBackground
if (ele.component === 'VQuery') {
ele.propValue = propValue
ele.propValue?.forEach(queryItem => {
queryItem['mPlaceholder'] = queryItem.placeholder
queryItem['mQueryConditionWidth'] = queryItem.queryConditionWidth
queryItem.placeholder = queryItem.tempPlaceholder
queryItem.queryConditionWidth = queryItem.tempQueryConditionWidth
})
}
if (ele.component === 'DeTabs') {
ele.propValue?.forEach(tabItem => {
tabItem.componentData?.forEach(tabComponent => {

View File

@@ -19,6 +19,18 @@ const checkItemPosition = component => {
component.sizeY = 20
}
const apdataQuery = ele => {
if (ele.component === 'VQuery') {
ele.propValue?.forEach(queryItem => {
queryItem['tempPlaceholder'] = queryItem.placeholder
queryItem['tempQueryConditionWidth'] = queryItem.queryConditionWidth
queryItem.placeholder = queryItem.mPlaceholder || queryItem.placeholder
queryItem.queryConditionWidth =
queryItem.mQueryConditionWidth || queryItem.queryConditionWidth
})
}
}
const hanedleMessage = event => {
if (event.data.type === 'panelInit') {
const { componentData, canvasStyleData, dvInfo, canvasViewInfo, isEmbedded } = event.data.value
@@ -31,6 +43,7 @@ const hanedleMessage = event => {
ele.style = deepCopy(mStyle || ele.style)
ele.commonBackground = deepCopy(mCommonBackground || ele.commonBackground)
ele.events = deepCopy(mEvents || ele.events)
apdataQuery(ele)
if (ele.component === 'DeTabs') {
ele.propValue?.forEach(tabItem => {
@@ -46,7 +59,7 @@ const hanedleMessage = event => {
)
tabComponent.events = deepCopy(tEvents || tabComponent.events)
if (tabComponent.component === 'VQuery') {
tabComponent.propValue = deepCopy(tPropValue || tabComponent.propValue)
tabComponent.propValue = deepCopy(tabComponent.propValue)
}
})
})