浏览代码

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

避免硬编码初始值,为后续动态数据填充做准备
liujia 2 月之前
父节点
当前提交
289b43c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/views/device/detail/components/breathLineChart/index.vue

+ 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 = {