From abe386511218c2597eec9367fcb2feb2d9f19664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Tue, 4 Jun 2019 18:21:36 +0800 Subject: [PATCH] support dark theme --- .../src/components/Applications/index.less | 4 +-- AccountSettings/src/style.less | 2 +- FormStepForm/src/components/Result/index.less | 2 +- ListBasicList/src/_mock.ts | 4 +-- ListTableList/src/_mock.ts | 4 +-- ResultFail/src/Result/index.less | 2 +- ResultFail/src/index.less | 6 ++++ ResultFail/src/index.tsx | 17 ++--------- ResultSuccess/src/Result/index.less | 2 +- ResultSuccess/src/index.less | 16 +++++++++++ ResultSuccess/src/index.tsx | 28 +++++-------------- UserRegisterResult/src/Result/index.less | 2 +- package.json | 2 +- 13 files changed, 43 insertions(+), 48 deletions(-) create mode 100644 ResultSuccess/src/index.less diff --git a/AccountCenter/src/components/Applications/index.less b/AccountCenter/src/components/Applications/index.less index 6fa63e32..a8ad7554 100644 --- a/AccountCenter/src/components/Applications/index.less +++ b/AccountCenter/src/components/Applications/index.less @@ -10,9 +10,7 @@ .ant-card-meta-avatar { font-size: 0; } - .ant-card-actions { - background: #f7f9fa; - } + .ant-list .ant-list-item-content-single { max-width: 100%; } diff --git a/AccountSettings/src/style.less b/AccountSettings/src/style.less index abda0287..6a859578 100644 --- a/AccountSettings/src/style.less +++ b/AccountSettings/src/style.less @@ -36,7 +36,7 @@ } :global { .ant-list-split .ant-list-item:last-child { - border-bottom: 1px solid #e8e8e8; + border-bottom: 1px solid @border-color-split; } .ant-list-item { padding-top: 14px; diff --git a/FormStepForm/src/components/Result/index.less b/FormStepForm/src/components/Result/index.less index 00c95879..cc4ed6eb 100644 --- a/FormStepForm/src/components/Result/index.less +++ b/FormStepForm/src/components/Result/index.less @@ -40,7 +40,7 @@ .extra { padding: 24px 40px; text-align: left; - background: #fafafa; + background: @component-background; border-radius: @border-radius-sm; @media screen and (max-width: @screen-xs) { diff --git a/ListBasicList/src/_mock.ts b/ListBasicList/src/_mock.ts index f94d793b..7567867f 100644 --- a/ListBasicList/src/_mock.ts +++ b/ListBasicList/src/_mock.ts @@ -100,7 +100,7 @@ function fakeList(count: number): BasicListItemDataType[] { return list; } -let sourceData: Array; +let sourceData: Array = []; function getFakeList(req: { query: any }, res: { json: (arg0: BasicListItemDataType[]) => void }) { const params = req.query; @@ -117,7 +117,7 @@ function postFakeList(req: { body: any }, res: { json: (arg0: BasicListItemDataT // const params = getUrlParams(url); const { method, id } = body; // const count = (params.count * 1) || 20; - let result = sourceData; + let result = sourceData || []; switch (method) { case 'delete': diff --git a/ListTableList/src/_mock.ts b/ListTableList/src/_mock.ts index 1800036b..fe29d304 100644 --- a/ListTableList/src/_mock.ts +++ b/ListTableList/src/_mock.ts @@ -155,6 +155,6 @@ function postRule( } export default { - 'GET /api/': getRule, - 'POST /api/': postRule, + 'GET /api/rule': getRule, + 'POST /api/rule': postRule, }; diff --git a/ResultFail/src/Result/index.less b/ResultFail/src/Result/index.less index 00c95879..f1944ca3 100644 --- a/ResultFail/src/Result/index.less +++ b/ResultFail/src/Result/index.less @@ -40,7 +40,7 @@ .extra { padding: 24px 40px; text-align: left; - background: #fafafa; + background: @background-color-light; border-radius: @border-radius-sm; @media screen and (max-width: @screen-xs) { diff --git a/ResultFail/src/index.less b/ResultFail/src/index.less index c594abfd..c219f290 100644 --- a/ResultFail/src/index.less +++ b/ResultFail/src/index.less @@ -3,3 +3,9 @@ .error_icon { color: @highlight-color; } +.title { + margin-bottom: 16px; + color: @heading-color; + font-weight: 500; + font-size: 16px; +} diff --git a/ResultFail/src/index.tsx b/ResultFail/src/index.tsx index b4be7061..d0d38363 100644 --- a/ResultFail/src/index.tsx +++ b/ResultFail/src/index.tsx @@ -1,20 +1,13 @@ import React, { Fragment } from 'react'; import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale'; import { Button, Icon, Card } from 'antd'; -import Result from './Result'; import { GridContent } from '@ant-design/pro-layout'; +import Result from './Result'; import styles from './index.less'; const extra = ( -
+
- + +
- +
2016-12-12 12:32
@@ -40,31 +33,24 @@ const desc2 = ( const extra = ( -
+
- + 23421 - + - +