diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 88148d13b7..1ac36ccf3c 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -577,7 +577,11 @@ export const dvMainStore = defineStore('dataVisualization', { } else { viewInfo[propertyInfo.custom][propertyInfo.property] = propertyInfo.value } - useEmitt().emitter.emit('renderChart-' + viewId, viewInfo) + if (['tablePageMode', 'tablePageSize'].includes(propertyInfo.subProp)) { + useEmitt().emitter.emit('calcData-' + viewId, viewInfo) + } else { + useEmitt().emitter.emit('renderChart-' + viewId, viewInfo) + } }) } else { this.componentData.forEach(component => { diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue index 74d072a1bc..6e0093baf9 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue @@ -108,18 +108,21 @@ const renderChartFromDialog = (viewInfo: Chart, chartDataInfo) => { chartData.value = chartDataInfo renderChart(viewInfo, false) } -const renderChart = (view: Chart, resetPageInfo: boolean) => { - if (!view) { +const renderChart = (viewInfo: Chart, resetPageInfo: boolean) => { + if (!viewInfo) { return } // view 为引用对象 需要存库 view.data 直接赋值会导致保存不必要的数据 const chart = { - ...defaultsDeep(view, cloneDeep(BASE_VIEW_CONFIG)), + ...defaultsDeep(viewInfo, cloneDeep(BASE_VIEW_CONFIG)), data: chartData.value } as ChartObj setupPage(chart, resetPageInfo) myChart?.destroy() - const chartView = chartViewManager.getChartView(view.render, view.type) as S2ChartView + const chartView = chartViewManager.getChartView( + viewInfo.render, + viewInfo.type + ) as S2ChartView myChart = chartView.drawChart({ container: containerId, chart: toRaw(chart),