소스 검색

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