From e92a1ed4b9d115bf424bfa2f90a9c127559b6640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:10:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E9=85=8D=E7=BD=AE=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E9=83=A8=E5=88=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98=20(#1820?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/utils/canvasUtils.ts | 7 +++++++ .../src/views/dashboard/MobileConfigPanel.vue | 10 ++++++++++ .../src/views/mobile/panel/index.vue | 15 ++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) 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) } }) })