Просмотр исходного кода

UI: #9268 物联卡 基础统计物联卡状态文本/环形图样式微调

jackhoo_98 3 лет назад
Родитель
Сommit
aaa743cb31

+ 6 - 3
src/pages/home/components/CardStatics.tsx

@@ -29,9 +29,9 @@ const CardStatistics = (props: StatisticsProps) => {
           <div className={'home-guide-item'} key={item.name}>
             <div className={'item-english'}>{item.name}</div>
             {item.node ? (
-              <div style={{ display: 'flex', marginTop: 15, width: '60%' }}>
+              <div style={{ display: 'flex', marginTop: 15, width: '80%' }}>
                 {item.node.map((i: any) => (
-                  <div style={{ marginRight: 7 }}>
+                  <div key={i.name + i.value} style={{ minWidth: 58, marginRight: 8, zIndex: 1 }}>
                     <div style={{ fontSize: '14px', fontWeight: 'bold' }}>{i.value}</div>
                     <div className={`state ${i.className}`}>{i.name}</div>
                   </div>
@@ -46,7 +46,10 @@ const CardStatistics = (props: StatisticsProps) => {
                 <img src={item.children || defaultImage} />
               </div>
             ) : (
-              <div className={'item-index-echarts'} style={{ height: 75, width: 110 }}>
+              <div
+                className={'item-index-echarts'}
+                style={item.style || { height: 75, width: 110 }}
+              >
                 {item.children}
               </div>
             )}

+ 1 - 0
src/pages/home/components/index.less

@@ -76,6 +76,7 @@
 
     right: 12px;
     bottom: 5%;
+    z-index: 0;
     width: 50%;
   }
 }

+ 4 - 0
src/pages/iot-card/Home/index.tsx

@@ -191,6 +191,10 @@ export default () => {
                 name: '物联卡',
                 value: 0,
                 node: pieChartData.current,
+                style: {
+                  width: 70,
+                  height: 70,
+                },
                 children: <Echarts options={cardOptions} />,
               },
             ]}