perf: 优化公共接口更新数据的逻辑
This commit is contained in:
parent
ee1bd2b2b8
commit
c0c68e8b59
@ -119,7 +119,10 @@ export const useChartDataFetch = (
|
|||||||
|
|
||||||
if (isPreview()) {
|
if (isPreview()) {
|
||||||
targetComponent.request.requestDataType === RequestDataTypeEnum.Pond
|
targetComponent.request.requestDataType === RequestDataTypeEnum.Pond
|
||||||
? addGlobalDataInterface(targetComponent, useChartEditStore, updateCallback || echartsUpdateHandle)
|
? addGlobalDataInterface(targetComponent, useChartEditStore, (newData: any) => {
|
||||||
|
echartsUpdateHandle(newData)
|
||||||
|
if (updateCallback) updateCallback(newData)
|
||||||
|
})
|
||||||
: requestIntervalFn()
|
: requestIntervalFn()
|
||||||
} else {
|
} else {
|
||||||
requestIntervalFn()
|
requestIntervalFn()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user