forked from github/dataease
refactor: 首次添加图表的图标显示时机优化
This commit is contained in:
parent
9c9c8110b3
commit
50b83c75f5
@ -211,6 +211,7 @@ for (let i = 0, len = list.length; i < len; i++) {
|
|||||||
const item = list[i]
|
const item = list[i]
|
||||||
item.style = { ...commonStyle, ...item.style }
|
item.style = { ...commonStyle, ...item.style }
|
||||||
item['commonBackground'] = deepCopy(COMMON_COMPONENT_BACKGROUND_BASE)
|
item['commonBackground'] = deepCopy(COMMON_COMPONENT_BACKGROUND_BASE)
|
||||||
|
item['state'] = 'prepare'
|
||||||
list[i] = { ...commonAttr, ...item }
|
list[i] = { ...commonAttr, ...item }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,6 +525,11 @@ const calcData = (view, resetDrill = false, updateQuery = '') => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const updateChartData = view => {
|
||||||
|
curComponent.value['state'] = 'ready'
|
||||||
|
calcData(view, true, 'updateQuery')
|
||||||
|
}
|
||||||
|
|
||||||
const renderChart = view => {
|
const renderChart = view => {
|
||||||
useEmitt().emitter.emit('renderChart-' + view.id, view)
|
useEmitt().emitter.emit('renderChart-' + view.id, view)
|
||||||
snapshotStore.recordSnapshotCache('renderChart', view.id)
|
snapshotStore.recordSnapshotCache('renderChart', view.id)
|
||||||
@ -1637,7 +1642,7 @@ const onRefreshChange = val => {
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
class="result-style-button"
|
class="result-style-button"
|
||||||
@click="calcData(view, true, 'updateQuery')"
|
@click="updateChartData(view)"
|
||||||
>
|
>
|
||||||
<span style="font-size: 12px">
|
<span style="font-size: 12px">
|
||||||
{{ t('chart.update_chart_data') }}
|
{{ t('chart.update_chart_data') }}
|
||||||
|
@ -490,7 +490,7 @@ const loadingFlag = computed(() => {
|
|||||||
|
|
||||||
const chartAreaShow = computed(() => {
|
const chartAreaShow = computed(() => {
|
||||||
return (
|
return (
|
||||||
view.value.tableId ||
|
(view.value.tableId && element.value['state'] === 'ready') ||
|
||||||
view.value.type === 'rich-text' ||
|
view.value.type === 'rich-text' ||
|
||||||
(view.value.type === 'map' && view.value.customAttr.map.id)
|
(view.value.type === 'map' && view.value.customAttr.map.id)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user