Commit db9ac1ac2f533175d40d9b6387cbdf80300277c0
1 parent
a37815a1
fix(src/packages): 修复仪表盘,ws推送数据,有时候变回0了
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -34,7 +34,7 @@ const initOptions = useCanvasInitOptions(props.chartConfig.option, props.themeSe | @@ -34,7 +34,7 @@ const initOptions = useCanvasInitOptions(props.chartConfig.option, props.themeSe | ||
34 | 34 | ||
35 | use([DatasetComponent, CanvasRenderer, PieChart, GridComponent, TooltipComponent, LegendComponent, TitleComponent]) | 35 | use([DatasetComponent, CanvasRenderer, PieChart, GridComponent, TooltipComponent, LegendComponent, TitleComponent]) |
36 | 36 | ||
37 | -const option = reactive({ | 37 | +const option:any = reactive({ |
38 | value: {} | 38 | value: {} |
39 | }) | 39 | }) |
40 | 40 | ||
@@ -69,7 +69,7 @@ useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => { | @@ -69,7 +69,7 @@ useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => { | ||
69 | const singleKey = Object.keys(value) | 69 | const singleKey = Object.keys(value) |
70 | const singleValue = value[singleKey[0]] | 70 | const singleValue = value[singleKey[0]] |
71 | option.value.series[0].data[0].value = singleValue | 71 | option.value.series[0].data[0].value = singleValue |
72 | - } else { | 72 | + } else { |
73 | option.value.series[0].data[0].value = resData | 73 | option.value.series[0].data[0].value = resData |
74 | } | 74 | } |
75 | }) | 75 | }) |