From 63b76456fd8a79f1f08edc0cbf6e00487793e6ce Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 13 Nov 2017 21:04:49 +0800 Subject: [PATCH] Remove v2 reset styles --- src/components/Charts/ChartCard/index.js | 2 +- src/components/Charts/ChartCard/index.less | 1 + src/components/Charts/Field/index.js | 4 ++-- src/components/Charts/Field/index.less | 1 + src/components/Charts/Pie/index.js | 2 +- src/components/Charts/Pie/index.less | 2 ++ src/components/Charts/Radar/index.less | 4 ++++ src/components/StandardTable/index.js | 12 ++++++------ src/index.less | 2 -- src/layouts/BasicLayout.less | 2 +- src/layouts/UserLayout.js | 2 +- src/routes/Dashboard/Analysis.less | 4 +++- src/routes/Dashboard/Workplace.js | 4 ++-- src/routes/Dashboard/Workplace.less | 1 + src/routes/List/BasicList.less | 1 + src/routes/List/FilterCardList.less | 1 + src/routes/List/SearchList.js | 2 +- src/routes/Profile/AdvancedProfile.js | 2 +- src/routes/User/Register.js | 8 ++++---- 19 files changed, 34 insertions(+), 23 deletions(-) diff --git a/src/components/Charts/ChartCard/index.js b/src/components/Charts/ChartCard/index.js index 2a486d68..fd442673 100644 --- a/src/components/Charts/ChartCard/index.js +++ b/src/components/Charts/ChartCard/index.js @@ -14,7 +14,7 @@ const ChartCard = ({ { // eslint-disable-next-line - total &&

+ total &&

}
diff --git a/src/components/Charts/ChartCard/index.less b/src/components/Charts/ChartCard/index.less index 2d60257b..986cc7d6 100644 --- a/src/components/Charts/ChartCard/index.less +++ b/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; diff --git a/src/components/Charts/Field/index.js b/src/components/Charts/Field/index.js index ed525c56..0f9ace22 100644 --- a/src/components/Charts/Field/index.js +++ b/src/components/Charts/Field/index.js @@ -3,10 +3,10 @@ import React from 'react'; import styles from './index.less'; const Field = ({ label, value, ...rest }) => ( -

+

{label} {value} -

+
); export default Field; diff --git a/src/components/Charts/Field/index.less b/src/components/Charts/Field/index.less index 8242dcc9..2848f9db 100644 --- a/src/components/Charts/Field/index.less +++ b/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; diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index 770a94ad..76395f45 100644 --- a/src/components/Charts/Pie/index.js +++ b/src/components/Charts/Pie/index.js @@ -219,7 +219,7 @@ class Pie extends Component { {subTitle &&

{subTitle}

} { // eslint-disable-next-line - total &&

+ total &&

}
) diff --git a/src/components/Charts/Pie/index.less b/src/components/Charts/Pie/index.less index 176566ea..94787398 100644 --- a/src/components/Charts/Pie/index.less +++ b/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; diff --git a/src/components/Charts/Radar/index.less b/src/components/Charts/Radar/index.less index 0e982724..378db9c4 100644 --- a/src/components/Charts/Radar/index.less +++ b/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; diff --git a/src/components/StandardTable/index.js b/src/components/StandardTable/index.js index 05179521..f98e9399 100644 --- a/src/components/StandardTable/index.js +++ b/src/components/StandardTable/index.js @@ -60,9 +60,9 @@ class StandardTable extends PureComponent { dataIndex: 'callNo', sorter: true, render: val => ( -

+

{val} 万 -

+
), }, { @@ -99,11 +99,11 @@ class StandardTable extends PureComponent { { title: '操作', render: () => ( -

+

配置 订阅警报 -

+
), }, ]; @@ -127,11 +127,11 @@ class StandardTable extends PureComponent {
+
已选择 {selectedRowKeys.length} 项   服务调用总计 {totalCallNo}清空 -

+
)} type="info" showIcon diff --git a/src/index.less b/src/index.less index 5da336e8..bd58c5d5 100644 --- a/src/index.less +++ b/src/index.less @@ -1,5 +1,3 @@ -@import '~antd/lib/style/v2-compatible-reset.less'; - html, body, :global(#root) { height: 100%; } diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index d59a45d9..6ab937a8 100644 --- a/src/layouts/BasicLayout.less +++ b/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; } diff --git a/src/layouts/UserLayout.js b/src/layouts/UserLayout.js index 87aff289..923983d0 100644 --- a/src/layouts/UserLayout.js +++ b/src/layouts/UserLayout.js @@ -50,7 +50,7 @@ class UserLayout extends React.PureComponent { Ant Design
-

Ant Design 是西湖区最具影响力的 Web 设计规范

+
Ant Design 是西湖区最具影响力的 Web 设计规范
{ getRouteData('UserLayout').map(item => diff --git a/src/routes/Dashboard/Analysis.less b/src/routes/Dashboard/Analysis.less index 6ad7c2a0..cdd326e6 100644 --- a/src/routes/Dashboard/Analysis.less +++ b/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; diff --git a/src/routes/Dashboard/Workplace.js b/src/routes/Dashboard/Workplace.js index aab68e90..40e2c904 100644 --- a/src/routes/Dashboard/Workplace.js +++ b/src/routes/Dashboard/Workplace.js @@ -142,8 +142,8 @@ export default class Workplace extends PureComponent {
-

早安,曲丽丽,祝你开心每一天!

-

交互专家 | 蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED

+
早安,曲丽丽,祝你开心每一天!
+
交互专家 | 蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED
); diff --git a/src/routes/Dashboard/Workplace.less b/src/routes/Dashboard/Workplace.less index 7889bd6d..dcb181ad 100644 --- a/src/routes/Dashboard/Workplace.less +++ b/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; diff --git a/src/routes/List/BasicList.less b/src/routes/List/BasicList.less index 51748681..94d677cc 100644 --- a/src/routes/List/BasicList.less +++ b/src/routes/List/BasicList.less @@ -61,6 +61,7 @@ } & > p { margin-top: 4px; + margin-bottom: 0; line-height: 22px; } } diff --git a/src/routes/List/FilterCardList.less b/src/routes/List/FilterCardList.less index 23a88dff..7c7747ea 100644 --- a/src/routes/List/FilterCardList.less +++ b/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; diff --git a/src/routes/List/SearchList.js b/src/routes/List/SearchList.js index 0bf3f83e..dadde8de 100644 --- a/src/routes/List/SearchList.js +++ b/src/routes/List/SearchList.js @@ -107,7 +107,7 @@ export default class SearchList extends Component { const ListContent = ({ data: { content, updatedAt, avatar, owner, href } }) => (
-

{content}

+
{content}
{owner} 发布在 {href} {moment(updatedAt).format('YYYY-MM-DD hh:mm')} diff --git a/src/routes/Profile/AdvancedProfile.js b/src/routes/Profile/AdvancedProfile.js index 9cb95f84..7848a7cc 100644 --- a/src/routes/Profile/AdvancedProfile.js +++ b/src/routes/Profile/AdvancedProfile.js @@ -92,7 +92,7 @@ const popoverContent = ( 未响应} /> -

耗时:2小时25分钟

+
耗时:2小时25分钟
); diff --git a/src/routes/User/Register.js b/src/routes/User/Register.js index fbbfbecf..94ebc888 100644 --- a/src/routes/User/Register.js +++ b/src/routes/User/Register.js @@ -9,9 +9,9 @@ const { Option } = Select; const InputGroup = Input.Group; const passwordStatusMap = { - ok:

强度:强

, - pass:

强度:中

, - pool:

强度:太短

, + ok:
强度:强
, + pass:
强度:中
, + pool:
强度:太短
, }; const passwordProgressMap = { @@ -163,7 +163,7 @@ export default class Register extends Component {
{passwordStatusMap[this.getPasswordStatus()]} {this.renderPasswordProgress()} -

请至少输入 6 个字符。请不要使用容易被猜到的密码。

+
请至少输入 6 个字符。请不要使用容易被猜到的密码。
} overlayStyle={{ width: 240 }} -- GitLab