fix: 修改图表数据接口的hooks

This commit is contained in:
MTrun
2022-03-25 19:58:39 +08:00
parent a43f0791ea
commit c46c6d30e7
11 changed files with 121 additions and 23 deletions
+3 -1
View File
@@ -6,11 +6,13 @@ import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore
import { RequestDataTypeEnum } from '@/enums/httpEnum'
import { isPreview } from '@/utils'
type ChartEditStoreType = typeof useChartEditStore
/**
* 图表的 setdata 数据监听与更改
* @param chartConfig
*/
export const useChartDataFetch = (chartConfig: CreateComponentType) => {
export const useChartDataFetch = (chartConfig: CreateComponentType, useChartEditStore: ChartEditStoreType) => {
const vChartRef = ref<typeof VChart | null>(null)
let fetchInterval: any = 0