From 6a2db14093af92065703584c5f2d47aeca2a3d42 Mon Sep 17 00:00:00 2001 From: wisonic Date: Mon, 29 Jul 2024 17:17:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E9=80=8F=E8=A7=86?= =?UTF-8?q?=E8=A1=A8=E6=8E=92=E5=BA=8F=E5=AD=97=E6=AE=B5=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor-style/components/table/TableTotalSelector.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableTotalSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableTotalSelector.vue index 815b724c23..0a25c923c9 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableTotalSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableTotalSelector.vue @@ -67,10 +67,12 @@ const init = () => { const yAxis = props.chart.yAxis if (yAxis?.length > 0) { const axisArr = yAxis.map(i => i.dataeaseName) - if (axisArr.indexOf(state.tableTotalForm.row.totalSortField) != -1) { + if (axisArr.indexOf(state.tableTotalForm.row.totalSortField) === -1) { state.tableTotalForm.row.totalSortField = yAxis[0].dataeaseName } - state.tableTotalForm.col.totalSortField = yAxis[0].dataeaseName + if (axisArr.indexOf(state.tableTotalForm.col.totalSortField) === -1) { + state.tableTotalForm.col.totalSortField = yAxis[0].dataeaseName + } } else { state.tableTotalForm.row.totalSortField = '' state.tableTotalForm.col.totalSortField = '' @@ -279,7 +281,7 @@ onMounted(() => { v-model="state.tableTotalForm.row.totalSortField" class="form-item-select" :placeholder="t('chart.total_sort_field')" - @change="changeTableTotal('row')" + @change="changeTableTotal('row.totalSortField')" >