Przeglądaj źródła

fix(breathLineChart): 初始化基准数据为空数组

避免硬编码初始值,为后续动态数据填充做准备
liujia 2 miesięcy temu
rodzic
commit
289b43c

+ 1 - 1
src/views/device/detail/components/breathLineChart/index.vue

@@ -31,7 +31,7 @@ onMounted(() => {
   const step = 1 // 每秒一个点
   const maxPoints = totalSeconds / step + 1
   const xAxisData = Array.from({ length: maxPoints }, (_, i) => i * step)
-  const lineData: number[] = Array(maxPoints).fill(20) // 初始基准值为20
+  const lineData: number[] = [] // 初始基准数据
 
   // 初始化图表配置
   option.value = {