From ff0385ab2af4385703a8023fc616eb9fe49749aa Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Mon, 30 Oct 2017 11:23:48 +0800 Subject: [PATCH] improve according to http://gitlab.alipay-inc.com/ued/ant-design/issues/269 --- src/routes/Forms/BasicForm.js | 2 +- src/routes/List/CardList.js | 23 ++++++++++------------- src/routes/List/CardList.less | 9 +++++++++ src/routes/List/CoverCardList.less | 6 +++--- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/routes/Forms/BasicForm.js b/src/routes/Forms/BasicForm.js index de6cafe8..35249225 100644 --- a/src/routes/Forms/BasicForm.js +++ b/src/routes/Forms/BasicForm.js @@ -178,7 +178,7 @@ export default class BasicForms extends PureComponent { 提交 - + diff --git a/src/routes/List/CardList.js b/src/routes/List/CardList.js index d4c968ce..3757f19d 100644 --- a/src/routes/List/CardList.js +++ b/src/routes/List/CardList.js @@ -1,6 +1,5 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; -import { Link } from 'dva/router'; import { Card, Button, Icon, List } from 'antd'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; @@ -63,18 +62,16 @@ export default class CardList extends PureComponent { dataSource={['', ...list]} renderItem={item => (item ? ( - 操作一, 操作二]}> - - } - title={item.title} - description={( -

- {item.description} -

- )} - /> - + 操作一, 操作二]}> + } + title={{item.title}} + description={( +

+ {item.description} +

+ )} + />
) : ( diff --git a/src/routes/List/CardList.less b/src/routes/List/CardList.less index ded72a3c..f1b73478 100644 --- a/src/routes/List/CardList.less +++ b/src/routes/List/CardList.less @@ -8,10 +8,18 @@ :global { .ant-card-meta-title { margin-bottom: 12px; + & > a { + color: @heading-color; + } } .ant-card-actions { background: #f7f9fa; } + .ant-card-body:hover { + .ant-card-meta-title > a { + color: @primary-color; + } + } } } } @@ -28,6 +36,7 @@ .newButton { background-color: #fff; border-color: @border-color-base; + border-radius: @border-radius-sm; color: @text-color-secondary; width: 100%; height: 188px; diff --git a/src/routes/List/CoverCardList.less b/src/routes/List/CoverCardList.less index a847c0c8..129bb17d 100644 --- a/src/routes/List/CoverCardList.less +++ b/src/routes/List/CoverCardList.less @@ -8,9 +8,9 @@ :global { .ant-card-meta-title { margin-bottom: 4px; - } - .ant-card-meta-title > a { - color: @heading-color; + & > a { + color: @heading-color; + } } .ant-card-meta-description { height: 44px; -- GitLab