소스 검색

默认值

liushengqiang 2 년 전
부모
커밋
797ba0fd11
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/views/subject-echarts/index.tsx

+ 2 - 2
src/views/subject-echarts/index.tsx

@@ -358,9 +358,9 @@ export default defineComponent({
           <div class={styles.headLabelWrap}>
             {activeData.colors.map((c, cIndex) => {
               return (
-                <div class={styles.headLabel} style={{display: c.select && activeData.sum[c.key] ? '' : 'none'}}>
+                <div class={styles.headLabel} style={{display: c.select ? '' : 'none'}}>
                   <div class={styles.headLabelDot} style={{background: c.color, color: c.color}}></div>
-                  <div style={{color: c.color}}>{activeData.sum[c.key]}{cIndex === 0 ? '%' : '人'}</div>
+                  <div style={{color: c.color}}>{activeData.sum[c.key] || 0}{cIndex === 0 ? '%' : '人'}</div>
                 </div>
               )
             })}