Explorar el Código

Fix some style problems

afc163 hace 8 años
padre
commit
bb85b06d7d
Se han modificado 3 ficheros con 10 adiciones y 13 borrados
  1. 1 1
      src/index.less
  2. 4 4
      src/routes/List/BasicList.js
  3. 5 8
      src/routes/List/BasicList.less

+ 1 - 1
src/index.less

@@ -22,6 +22,6 @@ body {
 // temp fix for https://github.com/ant-design/ant-design/commit/a1fafb5b727b62cb0be29ce6e9eca8f579d4f8b7
 :global {
   .ant-spin-container {
-    overflow: visible;
+    overflow: visible !important;
   }
 }

+ 4 - 4
src/routes/List/BasicList.js

@@ -60,16 +60,16 @@ export default class BasicList extends PureComponent {
 
     const ListContent = ({ data: { owner, createdAt, percent, status } }) => (
       <div className={styles.listContent}>
-        <div>
+        <div className={styles.listContentItem}>
           <span>Owner</span>
           <p>{owner}</p>
         </div>
-        <div>
+        <div className={styles.listContentItem}>
           <span>开始时间</span>
           <p>{moment(createdAt).format('YYYY-MM-DD hh:mm')}</p>
         </div>
-        <div>
-          <Progress percent={percent} status={status} strokeWidth={6} />
+        <div className={styles.listContentItem}>
+          <Progress percent={percent} status={status} strokeWidth={6} style={{ width: 180 }} />
         </div>
       </div>
     );

+ 5 - 8
src/routes/List/BasicList.less

@@ -37,6 +37,7 @@
       color: @heading-color;
       font-size: 24px;
       line-height: 32px;
+      margin: 0;
     }
     & > em {
       background-color: @border-color-split;
@@ -49,25 +50,21 @@
   }
   .listContent {
     font-size: 0;
-    & > div {
+    .listContentItem {
       color: @text-color-secondary;
       display: inline-block;
+      vertical-align: middle;
       font-size: @font-size-base;
       margin-left: 40px;
-      & > span {
+      > span {
         line-height: 20px;
       }
-      & > p {
+      > p {
         margin-top: 4px;
         margin-bottom: 0;
         line-height: 22px;
       }
     }
-    & > div:last-child {
-      position: relative;
-      top: -16px;
-      width: 188px;
-    }
   }
   .extraContentSearch {
     margin-left: 16px;