diff --git a/core/core-frontend/src/custom-component/component-list.ts b/core/core-frontend/src/custom-component/component-list.ts index 330e3bd9f1..78f0ed76ae 100644 --- a/core/core-frontend/src/custom-component/component-list.ts +++ b/core/core-frontend/src/custom-component/component-list.ts @@ -211,6 +211,7 @@ for (let i = 0, len = list.length; i < len; i++) { const item = list[i] item.style = { ...commonStyle, ...item.style } item['commonBackground'] = deepCopy(COMMON_COMPONENT_BACKGROUND_BASE) + item['state'] = 'prepare' list[i] = { ...commonAttr, ...item } } diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 2dbecc1930..c17ae8a7c8 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -525,6 +525,11 @@ const calcData = (view, resetDrill = false, updateQuery = '') => { } } +const updateChartData = view => { + curComponent.value['state'] = 'ready' + calcData(view, true, 'updateQuery') +} + const renderChart = view => { useEmitt().emitter.emit('renderChart-' + view.id, view) snapshotStore.recordSnapshotCache('renderChart', view.id) @@ -1637,7 +1642,7 @@ const onRefreshChange = val => { {{ t('chart.update_chart_data') }} diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index ca58eec789..510b2eb7e0 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -490,7 +490,7 @@ const loadingFlag = computed(() => { const chartAreaShow = computed(() => { return ( - view.value.tableId || + (view.value.tableId && element.value['state'] === 'ready') || view.value.type === 'rich-text' || (view.value.type === 'map' && view.value.customAttr.map.id) )