From 7ffccd3a53c626fc5b39d107afdb390bf993ef1e Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Fri, 19 Jul 2024 17:35:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20AntV=20=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E6=8A=98=E7=BA=BF=E5=9B=BE=E6=8A=98=E7=82=B9?= =?UTF-8?q?=E5=8F=98=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/customComponent/UserView.vue | 4 ++-- core/frontend/src/components/canvas/utils/style.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index c02e094595..4eacd95238 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -986,8 +986,8 @@ export default { this.scale = Math.min(this.previewCanvasScale.scalePointWidth, this.previewCanvasScale.scalePointHeight) * this.scaleCoefficient const customAttrChart = JSON.parse(this.sourceCustomAttrStr) const customStyleChart = JSON.parse(this.sourceCustomStyleStr) - recursionTransObj(customAttrTrans, customAttrChart, this.scale, this.scaleCoefficientType) - recursionTransObj(customStyleTrans, customStyleChart, this.scale, this.scaleCoefficientType) + recursionTransObj(customAttrTrans, customAttrChart, this.scale, this.scaleCoefficientType, this.chart?.render) + recursionTransObj(customStyleTrans, customStyleChart, this.scale, this.scaleCoefficientType, this.chart?.render) // 移动端地图标签不显示 if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') { customAttrChart.label.show = false diff --git a/core/frontend/src/components/canvas/utils/style.js b/core/frontend/src/components/canvas/utils/style.js index b2b6b0f9b1..2f07cc6d16 100644 --- a/core/frontend/src/components/canvas/utils/style.js +++ b/core/frontend/src/components/canvas/utils/style.js @@ -296,14 +296,14 @@ export function getScaleValue(propValue, scale) { return propValueTemp > 1 ? propValueTemp : 1 } -export function recursionTransObj(template, infoObj, scale, terminal) { +export function recursionTransObj(template, infoObj, scale, terminal, render) { for (const templateKey in template) { // 如果是数组 进行赋值计算 if (template[templateKey] instanceof Array) { template[templateKey].forEach(templateProp => { if (infoObj[templateKey] && infoObj[templateKey][templateProp]) { // 移动端特殊属性值设置 - if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) { + if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined && render !== 'antv') { infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp] } else { infoObj[templateKey][templateProp] = getScaleValue(infoObj[templateKey][templateProp], scale) @@ -313,7 +313,7 @@ export function recursionTransObj(template, infoObj, scale, terminal) { } else { // 如果是对象 继续进行递归 if (infoObj[templateKey]) { - recursionTransObj(template[templateKey], infoObj[templateKey], scale, terminal) + recursionTransObj(template[templateKey], infoObj[templateKey], scale, terminal, render) } } }