From 957fc2896a32326392991086c161f640d8d77ce2 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Fri, 4 Nov 2022 11:34:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE-=E6=B0=B4=E6=B3=A2?= =?UTF-8?q?=E5=9B=BE=E5=92=8C=E6=8C=87=E6=A0=87):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=93=8D=E4=BD=9CBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复水波图和指标批量修改标签无效的BUG --- .../components/shape-attr/LabelSelectorAntV.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue b/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue index f98dea4544..4772ddac22 100644 --- a/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue +++ b/frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue @@ -155,7 +155,7 @@ > {{ $t('chart.show') }}
@@ -167,7 +167,7 @@ v-model="labelForm.fontSize" :placeholder="$t('chart.text_fontsize')" size="mini" - @change="changeLabelAttr" + @change="changeLabelAttr('fontSize')" >
From 10dd44d3ce4d38090daccb543c0690657755c9bb Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Fri, 4 Nov 2022 11:38:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor(=E8=A7=86=E5=9B=BE-=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=93=8D=E4=BD=9C):=20=E4=BC=98=E5=8C=96=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=93=8D=E4=BD=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 批量操作时将第一个添加的视图或最后一个视图的属性作为默认属性 https://www.tapd.cn/55578866/bugtrace/bugs/view/1155578866001019214 --- .../canvas/custom-component/UserView.vue | 10 +++++++++ frontend/src/store/index.js | 21 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 9a0bd6ae43..eefeb4a3b8 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -552,12 +552,22 @@ export default { sourceCustomAttr[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr) this.chart.customAttr = this.sourceCustomAttrStr + this.$store.commit('updateComponentViewsData', { + viewId: this.chart.id, + propertyKey: 'customAttr', + propertyValue: this.sourceCustomAttrStr + }) updateParams['customAttr'] = this.sourceCustomAttrStr } else if (param.custom === 'customStyle') { const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr) sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.chart.customStyle = this.sourceCustomStyleStr + this.$store.commit('updateComponentViewsData', { + viewId: this.chart.id, + propertyKey: 'customStyle', + propertyValue: this.sourceCustomStyleStr + }) updateParams['customStyle'] = this.sourceCustomStyleStr } viewPropsSave(this.panelInfo.id, updateParams).then(rsp => { diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index c7fded233e..a91bd85c7c 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -597,10 +597,22 @@ const data = { if (element === id) { delete state.batchOptViews[id] state.curBatchOptComponents.splice(index, 1) - this.commit('setBatchOptChartInfo') break } } + if (state.curBatchOptComponents.length === 1) { + const lastViewId = state.curBatchOptComponents[0] + const viewBaseInfo = state.componentViewsData[lastViewId] + state.changeProperties.customAttr = JSON.parse(viewBaseInfo.customAttr) + state.changeProperties.customStyle = JSON.parse(viewBaseInfo.customStyle) + } + if (state.curBatchOptComponents.length === 0) { + state.changeProperties = { + customStyle: {}, + customAttr: {} + } + } + this.commit('setBatchOptChartInfo') }, addCurBatchComponent(state, id) { if (id) { @@ -610,11 +622,18 @@ const data = { // get properties const viewConfig = state.allViewRender.filter(item => item.render === viewBaseInfo.render && item.value === viewBaseInfo.type) if (viewConfig && viewConfig.length > 0) { + if (state.curBatchOptComponents.length === 1) { + state.changeProperties.customAttr = JSON.parse(viewBaseInfo.customAttr) + state.changeProperties.customStyle = JSON.parse(viewBaseInfo.customStyle) + } state.batchOptViews[id] = viewConfig[0] this.commit('setBatchOptChartInfo') } } }, + updateComponentViewsData(state, { viewId, propertyKey, propertyValue }) { + state.componentViewsData[viewId][propertyKey] = propertyValue + }, removeCurMultiplexingComponentWithId(state, id) { delete state.curMultiplexingComponents[id] }, From 5ecd45caeb5d61f30ca4a16bd803855b9c527293 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 4 Nov 2022 17:10:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E5=9C=B0=E5=9B=BE=E9=94=81=E5=AE=9A=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=AC=A6=E5=8F=B7=E6=97=A0=E6=B3=95=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 878dfb942d..9b086470af 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,7 +26,15 @@ }, "dependencies": { "@antv/g2plot": "^2.4.9", - "@antv/l7-maps": "^2.8.35", + "@antv/l7": "2.8.31", + "@antv/l7-component": "2.8.31", + "@antv/l7-core": "2.8.31", + "@antv/l7-layers": "2.8.31", + "@antv/l7-maps": "2.8.31", + "@antv/l7-renderer": "2.8.31", + "@antv/l7-scene": "2.8.31", + "@antv/l7-source": "2.8.31", + "@antv/l7-utils": "2.8.31", "@antv/s2": "^1.11.0", "@antv/util": "^2.0.17", "@riophae/vue-treeselect": "0.4.0",