Przeglądaj źródła

Remove v2 reset styles

afc163 8 lat temu
rodzic
commit
63b76456fd

+ 1 - 1
src/components/Charts/ChartCard/index.js

@@ -14,7 +14,7 @@ const ChartCard = ({
       </div>
       {
         // eslint-disable-next-line
-        total && <p className={styles.total} dangerouslySetInnerHTML={{ __html: total }} />
+        total && <div className={styles.total} dangerouslySetInnerHTML={{ __html: total }} />
       }
       <div className={styles.content} style={{ height: contentHeight || 'auto' }}>
         <div className={contentHeight && styles.contentFixed}>

+ 1 - 0
src/components/Charts/ChartCard/index.less

@@ -26,6 +26,7 @@
     .textOverflow();
     color: @heading-color;
     margin-top: 4px;
+    margin-bottom: 0;
     font-size: 30px;
     line-height: 38px;
     height: 38px;

+ 2 - 2
src/components/Charts/Field/index.js

@@ -3,10 +3,10 @@ import React from 'react';
 import styles from './index.less';
 
 const Field = ({ label, value, ...rest }) => (
-  <p className={styles.field} {...rest}>
+  <div className={styles.field} {...rest}>
     <span>{label}</span>
     <span>{value}</span>
-  </p>
+  </div>
 );
 
 export default Field;

+ 1 - 0
src/components/Charts/Field/index.less

@@ -4,6 +4,7 @@
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
+  margin: 0;
   span {
     font-size: @font-size-base;
     line-height: 22px;

+ 1 - 1
src/components/Charts/Pie/index.js

@@ -219,7 +219,7 @@ class Pie extends Component {
                   {subTitle && <h4 className="pie-sub-title">{subTitle}</h4>}
                   {
                     // eslint-disable-next-line
-                    total && <p className="pie-stat" dangerouslySetInnerHTML={{ __html: total }} />
+                    total && <div className="pie-stat" dangerouslySetInnerHTML={{ __html: total }} />
                   }
                 </div>
               )

+ 2 - 0
src/components/Charts/Pie/index.less

@@ -15,6 +15,8 @@
     top: 50%;
     transform: translateY(-50%);
     margin: 0 20px;
+    list-style: none;
+    padding: 0;
     li {
       cursor: pointer;
       margin-bottom: 16px;

+ 4 - 0
src/components/Charts/Radar/index.less

@@ -9,12 +9,16 @@
       cursor: pointer;
       color: @text-color-secondary;
       line-height: 22px;
+      p {
+        margin: 0;
+      }
       h6 {
         color: @heading-color;
         padding-left: 16px;
         font-size: 24px;
         line-height: 32px;
         margin-top: 4px;
+        margin-bottom: 0;
       }
       &:after {
         background-color: @border-color-split;

+ 6 - 6
src/components/StandardTable/index.js

@@ -60,9 +60,9 @@ class StandardTable extends PureComponent {
         dataIndex: 'callNo',
         sorter: true,
         render: val => (
-          <p style={{ textAlign: 'center' }}>
+          <div style={{ textAlign: 'center' }}>
             {val} 万
-          </p>
+          </div>
         ),
       },
       {
@@ -99,11 +99,11 @@ class StandardTable extends PureComponent {
       {
         title: '操作',
         render: () => (
-          <p>
+          <div>
             <a href="">配置</a>
             <span className={styles.splitLine} />
             <a href="">订阅警报</a>
-          </p>
+          </div>
         ),
       },
     ];
@@ -127,11 +127,11 @@ class StandardTable extends PureComponent {
         <div className={styles.tableAlert}>
           <Alert
             message={(
-              <p>
+              <div>
                 已选择 <a style={{ fontWeight: 600 }}>{selectedRowKeys.length}</a> 项&nbsp;&nbsp;
                 服务调用总计 <span style={{ fontWeight: 600 }}>{totalCallNo}</span> 万
                 <a onClick={this.cleanSelectedKeys} style={{ marginLeft: 24 }}>清空</a>
-              </p>
+              </div>
             )}
             type="info"
             showIcon

+ 0 - 2
src/index.less

@@ -1,5 +1,3 @@
-@import '~antd/lib/style/v2-compatible-reset.less';
-
 html, body, :global(#root) {
   height: 100%;
 }

+ 1 - 1
src/layouts/BasicLayout.less

@@ -25,7 +25,7 @@
     display: inline-block;
     vertical-align: middle;
     font-size: 20px;
-    margin-left: 12px;
+    margin: 0 0 0 12px;
     font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
     font-weight: 600;
   }

+ 1 - 1
src/layouts/UserLayout.js

@@ -50,7 +50,7 @@ class UserLayout extends React.PureComponent {
                 <span className={styles.title}>Ant Design</span>
               </Link>
             </div>
-            <p className={styles.desc}>Ant Design 是西湖区最具影响力的 Web 设计规范</p>
+            <div className={styles.desc}>Ant Design 是西湖区最具影响力的 Web 设计规范</div>
           </div>
           {
             getRouteData('UserLayout').map(item =>

+ 3 - 1
src/routes/Dashboard/Analysis.less

@@ -14,7 +14,9 @@
 }
 
 .rankingList {
-  margin-top: 25px;
+  margin: 25px 0 0;
+  padding: 0;
+  list-style: none;
   li {
     .clearfix();
     margin-top: 16px;

+ 2 - 2
src/routes/Dashboard/Workplace.js

@@ -142,8 +142,8 @@ export default class Workplace extends PureComponent {
           <Avatar size="large" src="https://gw.alipayobjects.com/zos/rmsportal/lctvVCLfRpYCkYxAsiVQ.png" />
         </div>
         <div className={styles.content}>
-          <p className={styles.contentTitle}>早安,曲丽丽,祝你开心每一天!</p>
-          <p>交互专家 | 蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED</p>
+          <div className={styles.contentTitle}>早安,曲丽丽,祝你开心每一天!</div>
+          <div>交互专家 | 蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED</div>
         </div>
       </div>
     );

+ 1 - 0
src/routes/Dashboard/Workplace.less

@@ -57,6 +57,7 @@
       color: @heading-color;
       font-size: 30px;
       line-height: 38px;
+      margin: 0;
       & > span {
         color: @text-color-secondary;
         font-size: 20px;

+ 1 - 0
src/routes/List/BasicList.less

@@ -61,6 +61,7 @@
       }
       & > p {
         margin-top: 4px;
+        margin-bottom: 0;
         line-height: 22px;
       }
     }

+ 1 - 0
src/routes/List/FilterCardList.less

@@ -27,6 +27,7 @@
       p {
         line-height: 32px;
         font-size: 24px;
+        margin: 0;
       }
       p:first-child {
         color: @text-color-secondary;

+ 1 - 1
src/routes/List/SearchList.js

@@ -107,7 +107,7 @@ export default class SearchList extends Component {
 
     const ListContent = ({ data: { content, updatedAt, avatar, owner, href } }) => (
       <div className={styles.listContent}>
-        <p className={styles.description}>{content}</p>
+        <div className={styles.description}>{content}</div>
         <div className={styles.extra}>
           <Avatar src={avatar} size="small" /><a href={href}>{owner}</a> 发布在 <a href={href}>{href}</a>
           <em>{moment(updatedAt).format('YYYY-MM-DD hh:mm')}</em>

+ 1 - 1
src/routes/Profile/AdvancedProfile.js

@@ -92,7 +92,7 @@ const popoverContent = (
     <span className={styles.textSecondary} style={{ float: 'right' }}>
       <Badge status="default" text={<span style={{ color: 'rgba(0, 0, 0, 0.45)' }}>未响应</span>} />
     </span>
-    <p className={styles.textSecondary} style={{ marginTop: 4 }}>耗时:2小时25分钟</p>
+    <div className={styles.textSecondary} style={{ marginTop: 4 }}>耗时:2小时25分钟</div>
   </div>
 );
 

+ 4 - 4
src/routes/User/Register.js

@@ -9,9 +9,9 @@ const { Option } = Select;
 const InputGroup = Input.Group;
 
 const passwordStatusMap = {
-  ok: <p className={styles.success}>强度:强</p>,
-  pass: <p className={styles.warning}>强度:中</p>,
-  pool: <p className={styles.error}>强度:太短</p>,
+  ok: <div className={styles.success}>强度:强</div>,
+  pass: <div className={styles.warning}>强度:中</div>,
+  pool: <div className={styles.error}>强度:太短</div>,
 };
 
 const passwordProgressMap = {
@@ -163,7 +163,7 @@ export default class Register extends Component {
                 <div style={{ padding: '4px 0' }}>
                   {passwordStatusMap[this.getPasswordStatus()]}
                   {this.renderPasswordProgress()}
-                  <p style={{ marginTop: 10 }}>请至少输入 6 个字符。请不要使用容易被猜到的密码。</p>
+                  <div style={{ marginTop: 10 }}>请至少输入 6 个字符。请不要使用容易被猜到的密码。</div>
                 </div>
               }
               overlayStyle={{ width: 240 }}