From b6440088be5859d11e9c1011c01896e6e9dc00af Mon Sep 17 00:00:00 2001 From: carrie-tanminyi <12mytan@gmail.com> Date: Tue, 28 Aug 2018 20:22:07 +0800 Subject: [PATCH 01/18] Update work-with-us.zh-CN.md (#11928) * Update work-with-us.zh-CN.md * Update work-with-us.zh-CN.md --- docs/spec/work-with-us.zh-CN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/spec/work-with-us.zh-CN.md b/docs/spec/work-with-us.zh-CN.md index a8e27e81f5..2435c038e6 100644 --- a/docs/spec/work-with-us.zh-CN.md +++ b/docs/spec/work-with-us.zh-CN.md @@ -25,8 +25,8 @@ title: 加入我们 - 岗位职责: - 参与金融云、数据服务、人工智能以及金融核心等业务领域的设计工作; - 参与 Ant Design 的打磨,将其建设成全球卓越的设计体系。 -- One More Thing: - - 你们总是为世界带去美好,但总是忘却你们也需要美好。我们正在努力打造[Kitchen](https://kitchen.alipay.com/)、[语雀画板](https://yuque.com/)等专属设计师的产品,让设计真正变成财富。期待志同道合的你,一道给设计行业带来「微小而美好的改变」。 +- One More Thing ❤️ : + - 你们总是为世界带去美好,但总是忘却你们也需要美好。我们正在努力打造 [🍳 Kitchen:一款为设计师提效的 Sketch 工具集](https://kitchen.alipay.com/)、[语雀画板](https://yuque.com/) 等专属设计师的产品,让设计真正变成财富。期待志同道合的你,一道给设计行业带来「微小而美好的改变」。 ## 前端工程师 From 6bf42db2edd3a3f0d486926631bf17867c17d8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Wed, 29 Aug 2018 00:21:46 +0800 Subject: [PATCH 02/18] Fix abnormal picture card position of Upload list, close #11183 (#11931) --- components/upload/style/index.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/upload/style/index.less b/components/upload/style/index.less index 62d2bb781f..7e6aca6dcf 100644 --- a/components/upload/style/index.less +++ b/components/upload/style/index.less @@ -296,6 +296,9 @@ } &-picture-card { + // https://github.com/ant-design/ant-design/issues/11183 + float: left; + &.@{upload-prefix-cls}-list:after { display: none; } From ac5742baaa82a993bec6b59f3861dd59dacbfa83 Mon Sep 17 00:00:00 2001 From: carrie-tanminyi <12mytan@gmail.com> Date: Wed, 29 Aug 2018 10:51:08 +0800 Subject: [PATCH 03/18] Update icon.zh-CN.md (#11940) --- docs/spec/icon.zh-CN.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/spec/icon.zh-CN.md b/docs/spec/icon.zh-CN.md index e52b42158f..11fff8abbe 100644 --- a/docs/spec/icon.zh-CN.md +++ b/docs/spec/icon.zh-CN.md @@ -11,6 +11,10 @@ title: 图标 --- +## 设计师专属🌟 + +安装 [Kitchen Sketch](https://kitchen.alipay.com) 插件,就可以一键拖拽使用 Ant Design 和 Iconfont 的海量图标,还可以关联自己的项目哦! + ## 系统图标 From 720b5f792cc65b02064cdf0da106965458bbae3a Mon Sep 17 00:00:00 2001 From: carrie-tanminyi <12mytan@gmail.com> Date: Wed, 29 Aug 2018 10:51:21 +0800 Subject: [PATCH 04/18] Update index.zh-CN.md (#11941) --- components/avatar/index.zh-CN.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/avatar/index.zh-CN.md b/components/avatar/index.zh-CN.md index 3aa304b628..24cd307915 100644 --- a/components/avatar/index.zh-CN.md +++ b/components/avatar/index.zh-CN.md @@ -7,6 +7,10 @@ title: Avatar 用来代表用户或事物,支持图片、图标或字符展示。 +## 设计师专属🌟 + +安装 [Kitchen Sketch](https://kitchen.alipay.com) 插件,就可以一键填充高逼格头像和文本哦! + ## API | 参数 | 说明 | 类型 | 默认值 | From 7d38f8f4359bbcd5372c03d4aa8fe854dc5553ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Francisco?= Date: Wed, 29 Aug 2018 05:20:33 +0200 Subject: [PATCH 05/18] improve form types and docs (#11932) --- components/form/Form.tsx | 2 ++ components/form/index.en-US.md | 1 + 2 files changed, 3 insertions(+) diff --git a/components/form/Form.tsx b/components/form/Form.tsx index b61840f88b..6f8cf649bc 100755 --- a/components/form/Form.tsx +++ b/components/form/Form.tsx @@ -74,6 +74,8 @@ export type GetFieldDecoratorOptions = { trigger?: string; /** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */ getValueFromEvent?: (...args: any[]) => any; + /** Get the component props according to field value. */ + getValueProps?: (value: any) => any; /** 校验子节点值的时机 */ validateTrigger?: string | string[]; /** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */ diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index 02a04744fe..a98d5bacf0 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -156,6 +156,7 @@ After wrapped by `getFieldDecorator`, `value`(or other property defined by `valu | -------- | ----------- | ---- | ------------- | | id | The unique identifier is required. support [nested fields format](https://github.com/react-component/form/pull/48). | string | | | options.getValueFromEvent | Specify how to get value from event or other onChange arguments | function(..args) | [reference](https://github.com/react-component/form#option-object) | +| options.getValueProps | Get the component props according to field value. | function(value): any | [reference](https://github.com/react-component/form#option-object) | options.initialValue | You can specify initial value, type, optional value of children node. (Note: Because `Form` will test equality with `===` internaly, we recommend to use vairable as `initialValue`, instead of literal) | | n/a | | options.normalize | Normalize value to form component, [a select-all example](https://codepen.io/afc163/pen/JJVXzG?editors=001) | function(value, prevValue, allValues): any | - | | options.rules | Includes validation rules. Please refer to "Validation Rules" part for details. | object\[] | n/a | From c63c971dedf878258fd6dce028dce9d40b656677 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Wed, 29 Aug 2018 11:21:15 +0800 Subject: [PATCH 06/18] fix: Nesting tabs of different sizes, the style does not take effect (#11936) --- components/tabs/style/index.less | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/components/tabs/style/index.less b/components/tabs/style/index.less index 1d6be76efa..3ef2183572 100644 --- a/components/tabs/style/index.less +++ b/components/tabs/style/index.less @@ -206,20 +206,26 @@ } } - &-large &-nav-container { - font-size: @tabs-title-font-size-lg; - } - - &-large &-tab { - padding: 16px; - } - - &-small &-nav-container { - font-size: @tabs-title-font-size-sm; + &-large { + > .@{tab-prefix-cls}-bar { + .@{tab-prefix-cls}-nav-container { + font-size: @tabs-title-font-size-lg; + } + .@{tab-prefix-cls}-tab { + padding: 16px; + } + } } - &-small &-tab { - padding: 8px 16px; + &-small { + > .@{tab-prefix-cls}-bar { + .@{tab-prefix-cls}-nav-container { + font-size: @tabs-title-font-size-sm; + } + .@{tab-prefix-cls}-tab { + padding: 8px 16px; + } + } } &:not(&-vertical) { From 7d5907500f5b1db59d30a17ef466271af3655fa2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 29 Aug 2018 17:40:05 +0800 Subject: [PATCH 07/18] revert steps description width to fix align issue --- components/steps/style/index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/steps/style/index.less b/components/steps/style/index.less index 087281e606..bcc5215ff7 100644 --- a/components/steps/style/index.less +++ b/components/steps/style/index.less @@ -25,7 +25,7 @@ @steps-small-icon-size: 24px; @steps-dot-size: 8px; @steps-current-dot-size: 10px; -@steps-desciption-max-width: 150px; +@steps-desciption-max-width: 140px; .@{steps-prefix-cls} { .reset-component; From 698aa3a01a6d9399b7e91d687a01bdb6090c6e6e Mon Sep 17 00:00:00 2001 From: hongxuWei Date: Thu, 30 Aug 2018 08:43:35 +0800 Subject: [PATCH 08/18] Fix the bug of edit cell demo --- components/table/demo/edit-cell.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/table/demo/edit-cell.md b/components/table/demo/edit-cell.md index da61046cd0..117138d03d 100644 --- a/components/table/demo/edit-cell.md +++ b/components/table/demo/edit-cell.md @@ -141,7 +141,7 @@ class EditableTable extends React.Component { dataIndex: 'operation', render: (text, record) => { return ( - this.state.dataSource.length > 1 + this.state.dataSource.length >= 1 ? ( this.handleDelete(record.key)}> Delete From 278ad821a4cf52380bf1f93f74c84c7f65bfeac3 Mon Sep 17 00:00:00 2001 From: hongxuWei Date: Thu, 30 Aug 2018 10:55:34 +0800 Subject: [PATCH 09/18] Fix issue #11908 missing right input border --- components/input/style/mixin.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/input/style/mixin.less b/components/input/style/mixin.less index c67c61e0f2..263b664417 100644 --- a/components/input/style/mixin.less +++ b/components/input/style/mixin.less @@ -272,7 +272,7 @@ } // https://github.com/ant-design/ant-design/issues/11863 - & > span > .@{inputClass} { + & > span:not(:last-child) > .@{inputClass} { border-right-width: 0; } From b076b52756c724f83debc57488c332de1872c8bf Mon Sep 17 00:00:00 2001 From: zombiej Date: Thu, 30 Aug 2018 17:59:09 +0800 Subject: [PATCH 10/18] fix #11967. Add children type validate in button.tsx --- components/button/button.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/button/button.tsx b/components/button/button.tsx index 89c5292b03..b6a3727a6e 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -49,6 +49,7 @@ export interface BaseButtonProps { className?: string; ghost?: boolean; block?: boolean; + children?: React.ReactNode; } export type AnchorButtonProps = { From fe2728cb20d6c79d9307758bcebe0d65243ceefe Mon Sep 17 00:00:00 2001 From: zombiej Date: Thu, 30 Aug 2018 22:27:32 +0800 Subject: [PATCH 11/18] fix #11969. Pass centered prop to popup modal --- components/modal/confirm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/modal/confirm.tsx b/components/modal/confirm.tsx index ccd29ff0ca..cdf5cc69c2 100644 --- a/components/modal/confirm.tsx +++ b/components/modal/confirm.tsx @@ -14,7 +14,7 @@ interface ConfirmDialogProps extends ModalFuncProps { const IS_REACT_16 = !!ReactDOM.createPortal; const ConfirmDialog = (props: ConfirmDialogProps) => { - const { onCancel, onOk, close, zIndex, afterClose, visible, keyboard } = props; + const { onCancel, onOk, close, zIndex, afterClose, visible, keyboard, centered } = props; const iconType = props.iconType || 'question-circle'; const okType = props.okType || 'primary'; const prefixCls = props.prefixCls || 'ant-confirm'; @@ -57,6 +57,7 @@ const ConfirmDialog = (props: ConfirmDialogProps) => { zIndex={zIndex} afterClose={afterClose} keyboard={keyboard} + centered={centered} >
From 8ff9dc6babffc626a7f536bb4c5a6ea0ce6edcdc Mon Sep 17 00:00:00 2001 From: Tom Xu Date: Thu, 30 Aug 2018 18:24:59 +0800 Subject: [PATCH 12/18] Table added a new less variable @table-header-color --- components/style/themes/default.less | 1 + components/table/style/index.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 3e2402579f..485aae5a49 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -341,6 +341,7 @@ // Table // -- @table-header-bg: @background-color-light; +@table-header-color: @heading-color; @table-header-sort-bg: @background-color-base; @table-row-hover-bg: @primary-1; @table-selected-row-bg: #fafafa; diff --git a/components/table/style/index.less b/components/table/style/index.less index 50219873be..c9e21ebe3e 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -33,7 +33,7 @@ background: @table-header-bg; transition: background .3s ease; text-align: left; - color: @heading-color; + color: @table-header-color; font-weight: 500; border-bottom: @border-width-base @border-style-base @border-color-split; From b02af8baa7c9289ddbab005b4b3da490a23cb228 Mon Sep 17 00:00:00 2001 From: Simon Fraser Date: Fri, 31 Aug 2018 09:02:29 +0100 Subject: [PATCH 13/18] Updating warning message about cards not having size attribute. --- components/tabs/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/tabs/index.tsx b/components/tabs/index.tsx index cb1b0769b6..f54f5b796a 100755 --- a/components/tabs/index.tsx +++ b/components/tabs/index.tsx @@ -116,7 +116,7 @@ export default class Tabs extends React.Component { warning( !(type.indexOf('card') >= 0 && (size === 'small' || size === 'large')), - 'Tabs[type=card|editable-card] doesn\'t have small or large size, it\'s by designed.', + 'Tabs[type=card|editable-card] doesn\'t have small or large size, it\'s by design.', ); const cls = classNames(className, { [`${prefixCls}-vertical`]: tabPosition === 'left' || tabPosition === 'right', From b84d515969f4dd3006a8b042c611bb685f90e264 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 31 Aug 2018 17:03:27 +0800 Subject: [PATCH 14/18] site: add promote badge --- components/avatar/index.zh-CN.md | 4 ++-- components/icon/index.zh-CN.md | 4 ++-- components/table/index.zh-CN.md | 4 ++-- docs/spec/colors.zh-CN.md | 5 ++--- docs/spec/download.en-US.md | 5 ++++- docs/spec/download.zh-CN.md | 5 ++++- docs/spec/icon.zh-CN.md | 4 ++-- site/theme/static/resource.less | 11 +++++++++++ site/theme/template/Home/Page3.jsx | 16 ++++++++++++++-- 9 files changed, 43 insertions(+), 15 deletions(-) diff --git a/components/avatar/index.zh-CN.md b/components/avatar/index.zh-CN.md index 24cd307915..1daf6c5e12 100644 --- a/components/avatar/index.zh-CN.md +++ b/components/avatar/index.zh-CN.md @@ -7,9 +7,9 @@ title: Avatar 用来代表用户或事物,支持图片、图标或字符展示。 -## 设计师专属🌟 +## 设计师专属 -安装 [Kitchen Sketch](https://kitchen.alipay.com) 插件,就可以一键填充高逼格头像和文本哦! +安装 [Kitchen Sketch 插件 💎](https://kitchen.alipay.com),一键填充高逼格头像和文本. ## API diff --git a/components/icon/index.zh-CN.md b/components/icon/index.zh-CN.md index e57ebfb05a..6dc481b0f0 100644 --- a/components/icon/index.zh-CN.md +++ b/components/icon/index.zh-CN.md @@ -19,9 +19,9 @@ toc: false 完整的图标设计规范请访问 [图标规范](/docs/spec/icon)。 -## 设计师专属 🌟 +## 设计师专属 -安装 [Kitchen Sketch](https://kitchen.alipay.com) 插件,就可以一键拖拽使用 Ant Design 和 Iconfont 官方的海量图标,还可以关联自己的项目哦! +安装 [Kitchen Sketch 插件 💎](https://kitchen.alipay.com),就可以一键拖拽使用 Ant Design 和 Iconfont 的海量图标,还可以关联自有项目。 ## 如何使用 diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index bf734f1136..58bc39a58c 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -8,9 +8,9 @@ subtitle: 表格 展示行列数据。 -## 设计师专属 🌟 +## 设计师专属 -还在用 Sketch 手动画表格吗?现在安装 [Kitchen Sketch](https://kitchen.alipay.com/) 插件,两步就可以自动生成 Ant Design 表格组件啦! +安装 [Kitchen Sketch 插件 💎](https://kitchen.alipay.com/),两步就可以自动生成 Ant Design 表格组件。 ## 何时使用 diff --git a/docs/spec/colors.zh-CN.md b/docs/spec/colors.zh-CN.md index 45bd3bc35c..ef51abd1ab 100644 --- a/docs/spec/colors.zh-CN.md +++ b/docs/spec/colors.zh-CN.md @@ -10,10 +10,9 @@ Ant Design 将色彩体系解读成两个层面:系统级色彩体系和产品 --- -## 设计师专属 🌟 - -安装 [Kitchen Sketch](https://kitchen.alipay.com) 插件,不但可以使用 Ant Design 官方色板库,还可以管理自己的专属色板哦! +## 设计师专属 +安装 [Kitchen Sketch 插件 💎](https://kitchen.alipay.com),不但可以使用 Ant Design 官方色板库,还可以管理自己的专属色板。 ## 色彩模型 diff --git a/docs/spec/download.en-US.md b/docs/spec/download.en-US.md index 8f14db2bec..81b01e4387 100644 --- a/docs/spec/download.en-US.md +++ b/docs/spec/download.en-US.md @@ -48,7 +48,10 @@ Please find below some of the design resources and tools about Ant Design that w
- Kitchen + + Kitchen + HOT + A Sketch plugin with a collection of great tools
diff --git a/docs/spec/download.zh-CN.md b/docs/spec/download.zh-CN.md index 5d9ce39f84..48bd6b883f 100644 --- a/docs/spec/download.zh-CN.md +++ b/docs/spec/download.zh-CN.md @@ -48,7 +48,10 @@ title: 设计资源
- Kitchen + + Kitchen + HOT + Sketch 工具集
diff --git a/docs/spec/icon.zh-CN.md b/docs/spec/icon.zh-CN.md index 11fff8abbe..33e7a398bf 100644 --- a/docs/spec/icon.zh-CN.md +++ b/docs/spec/icon.zh-CN.md @@ -11,9 +11,9 @@ title: 图标 --- -## 设计师专属🌟 +## 设计师专属 -安装 [Kitchen Sketch](https://kitchen.alipay.com) 插件,就可以一键拖拽使用 Ant Design 和 Iconfont 的海量图标,还可以关联自己的项目哦! +安装 [Kitchen Sketch 插件 💎](https://kitchen.alipay.com),可以一键拖拽使用 Ant Design 和 Iconfont 的海量图标,还可以关联自有项目。 ## 系统图标 diff --git a/site/theme/static/resource.less b/site/theme/static/resource.less index b8ec2ec1c2..759dcef0c1 100644 --- a/site/theme/static/resource.less +++ b/site/theme/static/resource.less @@ -64,6 +64,17 @@ margin-bottom: 6px; } +.resource-card-hot-badge { + background: #f50; + border-radius: 2px; + padding: 0 3px; + color: #fff; + font-size: 12px; + line-height: 20px; + margin-left: 2px; + vertical-align: top; +} + .resource-card-description { display: block; color: #697b8c; diff --git a/site/theme/template/Home/Page3.jsx b/site/theme/template/Home/Page3.jsx index 5b0955374e..217b9630cf 100644 --- a/site/theme/template/Home/Page3.jsx +++ b/site/theme/template/Home/Page3.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Row, Col } from 'antd'; +import { Row, Col, Tag } from 'antd'; import QueueAnim from 'rc-queue-anim'; import ScrollOverPack from 'rc-scroll-anim/lib/ScrollOverPack'; import { Link } from 'bisheng/router'; @@ -25,6 +25,7 @@ const page3Data = [ content: , img: 'https://gw.alipayobjects.com/zos/rmsportal/vUxYuDdsbBBcMDxSGmwc.svg', link: 'http://kitchen.alipay.com/', + hot: true, }, ]; @@ -41,6 +42,7 @@ const svgBg = [ , ]; const svgChildren = svgBgToParallax(svgBg); + export default function Page3({ locale }) { const isZhCN = locale === 'zh-CN'; const children = page3Data.map((item, i) => { @@ -49,7 +51,17 @@ export default function Page3({ locale }) { icon ,
-

{item.title}

+

+ {item.title} + {item.hot ? ( + + HOT + + ) : null} +

{item.content}

, ]; From e23efe3f4750f106a2209773e52b98bbc6428b7f Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 31 Aug 2018 17:38:02 +0800 Subject: [PATCH 15/18] Fix wave color mixed up, close #11985 --- components/_util/wave.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/components/_util/wave.tsx b/components/_util/wave.tsx index bef79c9c84..339a79d2c0 100644 --- a/components/_util/wave.tsx +++ b/components/_util/wave.tsx @@ -2,6 +2,8 @@ import * as React from 'react'; import { findDOMNode } from 'react-dom'; import TransitionEvents from 'css-animation/lib/Event'; +let styleForPesudo: HTMLStyleElement | null; + export default class Wave extends React.Component<{insertExtraNode?: boolean}> { private instance?: { cancel: () => void; @@ -9,7 +11,6 @@ export default class Wave extends React.Component<{insertExtraNode?: boolean}> { private extraNode: HTMLDivElement; private clickWaveTimeoutId: number; - private styleForPesudo: HTMLStyleElement | null; isNotGrey(color: string) { const match = (color || '').match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/); @@ -31,6 +32,7 @@ export default class Wave extends React.Component<{insertExtraNode?: boolean}> { node.removeAttribute(attributeName); node.setAttribute(attributeName, 'true'); // Not white or transparnt or grey + styleForPesudo = styleForPesudo || document.createElement('style'); if (waveColor && waveColor !== '#ffffff' && waveColor !== 'rgb(255, 255, 255)' && @@ -38,10 +40,11 @@ export default class Wave extends React.Component<{insertExtraNode?: boolean}> { !/rgba\(\d*, \d*, \d*, 0\)/.test(waveColor) && // any transparent rgba color waveColor !== 'transparent') { extraNode.style.borderColor = waveColor; - this.styleForPesudo = document.createElement('style'); - this.styleForPesudo.innerHTML = + styleForPesudo.innerHTML = `[ant-click-animating-without-extra-node]:after { border-color: ${waveColor}; }`; - document.body.appendChild(this.styleForPesudo); + if (!document.body.contains(styleForPesudo)) { + document.body.appendChild(styleForPesudo); + } } if (insertExtraNode) { node.appendChild(extraNode); @@ -104,9 +107,8 @@ export default class Wave extends React.Component<{insertExtraNode?: boolean}> { } removeExtraStyleNode() { - if (this.styleForPesudo && document.body.contains(this.styleForPesudo)) { - document.body.removeChild(this.styleForPesudo); - this.styleForPesudo = null; + if (styleForPesudo) { + styleForPesudo.innerHTML = ''; } } From fecb3b6914741e025a74a4a3105c1005252c9e58 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 1 Sep 2018 12:50:52 +0800 Subject: [PATCH 16/18] update card demo jsx format --- components/card/demo/basic.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/card/demo/basic.md b/components/card/demo/basic.md index f1978e6524..fbc272971f 100644 --- a/components/card/demo/basic.md +++ b/components/card/demo/basic.md @@ -17,7 +17,11 @@ A basic card containing a title, content and an extra corner content. import { Card } from 'antd'; ReactDOM.render( - More} style={{ width: 300 }}> + More} + style={{ width: 300 }} + >

Card content

Card content

Card content

From bc7164d871c4ebac7fd3605299030add6b331738 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 1 Sep 2018 12:58:52 +0800 Subject: [PATCH 17/18] Allow fontSize works on Card[headStyle], close #11995 --- components/card/style/index.less | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/card/style/index.less b/components/card/style/index.less index 1b675d4dab..265b7a5102 100644 --- a/components/card/style/index.less +++ b/components/card/style/index.less @@ -33,19 +33,19 @@ .clearfix; margin-bottom: -1px; // Fix card grid overflow bug: https://gw.alipayobjects.com/zos/rmsportal/XonYxBikwpgbqIQBeuhk.png min-height: @card-head-height; + font-size: @font-size-lg; + color: @card-head-color; + font-weight: 500; &-wrapper { display: flex; } &-title { - font-size: @font-size-lg; padding: @card-head-padding 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; - color: @card-head-color; - font-weight: 500; display: inline-block; flex: 1; } @@ -53,6 +53,9 @@ .@{ant-prefix}-tabs { margin-bottom: -17px; clear: both; + font-size: @font-size-base; + color: @text-color; + font-weight: normal; &-bar { border-bottom: @border-width-base @border-style-base @border-color-split; @@ -63,6 +66,9 @@ &-extra { float: right; padding: @card-head-padding + 1.5px 0; + font-size: @font-size-base; + color: @text-color; + font-weight: normal; text-align: right; // https://stackoverflow.com/a/22429853/3040605 margin-left: auto; From 53304d3b5a836be65e896f790f68f4053f3cb30d Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 1 Sep 2018 13:07:20 +0800 Subject: [PATCH 18/18] Fix extra padding of Card.Grid close #11996 --- components/card/style/index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/card/style/index.less b/components/card/style/index.less index 265b7a5102..70fad9bb3f 100644 --- a/components/card/style/index.less +++ b/components/card/style/index.less @@ -79,7 +79,7 @@ .clearfix; } - &-contain-grid:not(&-loading) { + &-contain-grid:not(&-loading) &-body { margin: -1px 0 0 -1px; padding: 0; }