diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index f6e0d14380..d44ddf974d 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -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 => { diff --git a/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue index 282e2dc1c5..3a8513e63f 100644 --- a/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue +++ b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue @@ -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 => { diff --git a/core/core-frontend/src/views/mobile/panel/index.vue b/core/core-frontend/src/views/mobile/panel/index.vue index a8c9a3fc58..1a4e5118ba 100644 --- a/core/core-frontend/src/views/mobile/panel/index.vue +++ b/core/core-frontend/src/views/mobile/panel/index.vue @@ -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) } }) })