forked from github/dataease
Merge pull request #6348 from dataease/pr@dev-v2@refactor_new-chart-tips
refactor: 首次添加图表的图标显示时机优化
This commit is contained in:
commit
306942017f
@ -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 }
|
||||
}
|
||||
|
||||
|
@ -521,6 +521,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)
|
||||
@ -1607,7 +1612,7 @@ const onRefreshChange = val => {
|
||||
<el-button
|
||||
type="primary"
|
||||
class="result-style-button"
|
||||
@click="calcData(view, true, 'updateQuery')"
|
||||
@click="updateChartData(view)"
|
||||
>
|
||||
<span style="font-size: 12px">
|
||||
{{ t('chart.update_chart_data') }}
|
||||
|
@ -497,7 +497,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)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user