From 8f3a94f43168b7ffa1d8042600536eb462942e69 Mon Sep 17 00:00:00 2001 From: lb Date: Sun, 2 Jul 2023 16:11:06 +0800 Subject: [PATCH] fix --- .../CenterTopData/LeftBoxes/index.jsx | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/components/CenterTopData/LeftBoxes/index.jsx b/src/components/CenterTopData/LeftBoxes/index.jsx index 3d82a54..b343428 100644 --- a/src/components/CenterTopData/LeftBoxes/index.jsx +++ b/src/components/CenterTopData/LeftBoxes/index.jsx @@ -1,35 +1,33 @@ +import React, { useState } from 'react'; -import React, { useState } from 'react' +import icon1 from '@/assets/CenterChart2icon1.svg'; +import icon2 from '@/assets/CenterChart2icon2.svg'; +import icon3 from '@/assets/CenterChart2icon3.svg'; +import icon4 from '@/assets/CenterChart2icon4.svg'; -import icon1 from '@/assets/CenterChart2icon1.svg' -import icon2 from '@/assets/CenterChart2icon2.svg' -import icon3 from '@/assets/CenterChart2icon3.svg' -import icon4 from '@/assets/CenterChart2icon4.svg' - -import cls from './leftbox.module.less' +import cls from './leftbox.module.less'; const Chart2 = () => { + const [data, setData] = useState([ + { icon: icon1, label: '换火时间', value: '08:34' }, + { icon: icon3, label: '剩余时间', value: '1170s' }, + { icon: icon2, label: '当前火向', value: '南向' }, + // { icon: icon4, label: '车间温度', value: '28℃' }, + ]); - const [data, setData] = useState([ - { icon: icon1, label: '换火时间', value: '12:08:34' }, - { icon: icon3, label: '剩余时间', value: '11h' }, - { icon: icon2, label: '当前火向', value: '南向' }, - // { icon: icon4, label: '车间温度', value: '28℃' }, - ]) - - return ( -
- {data.map(item => -
- Error -
-

{item.label}

-

{item.value}

-
-
- )} -
- ); -} + return ( +
+ {data.map((item) => ( +
+ Error +
+

{item.label}

+

{item.value}

+
+
+ ))} +
+ ); +}; export default Chart2;