diff --git a/CHANGELOG.md b/CHANGELOG.md index 12efec5b8f..bbf8694348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,27 @@ timeline: true --- +## 1.8.0 + +`2016-08-08` + +- Tabs + - 修复可关闭 Tabs 组件只有一个 Tab 的时候报错的问题。[#2559](https://github.com/ant-design/ant-design/issues/2559) +- Datepicker + - 修复 IE8 下关闭图标。[#2584](https://github.com/ant-design/ant-design/issues/2584) +- Tags + - 支持自定义标签颜色。[#2585](https://github.com/ant-design/ant-design/issues/2585) +- TreeSelect + - 修复未找到内容时的样式。[9cee9f](https://github.com/ant-design/ant-design/commit/9cee9f103a4729572358206c81cba84e2fdc20f5) +- Modal + - 适配小屏幕。[#2597](https://github.com/ant-design/ant-design/issues/2597) +- Layout + - 修复了 Row 组件在同一行闭合会报错的问题。[#2603](https://github.com/ant-design/ant-design/issues/2603) +- Table + - `rowSelection.onChange` 的参数 `selectedRows` 现在和 `selectedRowKeys` 保持一致。[#2566](https://github.com/ant-design/ant-design/issues/2603) +- Checkbox + - 支持了 `onClick` 事件。 + ## 1.7.0 `2016-07-30` diff --git a/components/back-top/index.tsx b/components/back-top/index.tsx index 721fdc9f5c..111de53212 100644 --- a/components/back-top/index.tsx +++ b/components/back-top/index.tsx @@ -87,10 +87,6 @@ export default class BackTop extends React.Component { ); - const style = { - display: this.state.visible ? 'block' : 'none', - }; - // fix https://fb.me/react-unknown-prop const divProps = omit(this.props, [ 'prefixCls', @@ -103,10 +99,8 @@ export default class BackTop extends React.Component { { this.state.visible ? -
-
- {children || defaultElement} -
+
+ {children || defaultElement}
: null } diff --git a/components/layout/index.zh-CN.md b/components/layout/index.zh-CN.md index 5ff5713768..68de72ee63 100644 --- a/components/layout/index.zh-CN.md +++ b/components/layout/index.zh-CN.md @@ -87,19 +87,23 @@ Ant Design 的布局组件若不能满足你的需求,你也可以直接使用 ### Row -| 成员 | 说明 | 类型 | 默认值 | -|------------|-----------------|--------------------|-------------| -| gutter | 栅格间隔 | number | 0 | -| type | 布局模式,可选 `flex`,现代浏览器下有效 | string | | +| 成员 | 说明 | 类型 | 默认值 | +|-----------|-----------------|--------------------|-------------| +| gutter | 栅格间隔 | number | 0 | +| type | 布局模式,可选 `flex`,现代浏览器下有效 | string | | | align | flex 布局下的垂直对齐方式:`top` `middle` `bottom` | string | `top` | | justify | flex 布局下的水平排列方式:`start` `end` `center` `space-around` `space-between` | string | `start` | ### Col -| 成员 | 说明 | 类型 | 默认值 | -|------------|-----------------|--------------------|-------------| -| span | 栅格占位格数,为 0 时相当于 `display: none` | number | 无 | -| order | 栅格顺序,`flex` 布局模式下有效 | number | 0 | -| offset | 栅格左侧的间隔格数,间隔内不可以有栅格 | number | 0 | +| 成员 | 说明 | 类型 | 默认值 | +|----------|-----------------|--------------------|-------------| +| span | 栅格占位格数,为 0 时相当于 `display: none` | number | - | +| order | 栅格顺序,`flex` 布局模式下有效 | number | 0 | +| offset | 栅格左侧的间隔格数,间隔内不可以有栅格 | number | 0 | | push | 栅格向右移动格数 | number | 0 | | pull | 栅格向左移动格数 | number | 0 | +| xs | `<768px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number or object | - | +| sm | `≥768px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number or object | - | +| md | `≥992px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number or object | - | +| lg | `≥1200px` 响应式栅格,可为栅格数或一个包含其他属性的对象 | number or object | - | diff --git a/components/modal/style/modal.less b/components/modal/style/modal.less index 24bb74bf9c..5f3244cda4 100644 --- a/components/modal/style/modal.less +++ b/components/modal/style/modal.less @@ -128,3 +128,16 @@ overflow: hidden; } } + + +@media (max-width: 768px) { + .@{dialog-prefix-cls} { + width: auto !important; + margin: 10px; + } + .vertical-center-modal { + .@{dialog-prefix-cls} { + flex: 1; + } + } +} diff --git a/components/transfer/demo/search.md b/components/transfer/demo/search.md index 306b760dcb..4260c4b416 100644 --- a/components/transfer/demo/search.md +++ b/components/transfer/demo/search.md @@ -1,17 +1,17 @@ --- order: 1 -title: +title: zh-CN: 带搜索框 en-US: Search --- ## zh-CN -带搜索框的穿梭框。 +带搜索框的穿梭框,可以自定义搜索函数。 ## en-US -Transfer with a search box +Transfer with a search box. ````jsx import { Transfer } from 'antd'; @@ -43,6 +43,9 @@ const App = React.createClass({ } this.setState({ mockData, targetKeys }); }, + filterOption(inputValue, option) { + return option.description.indexOf(inputValue) > -1; + }, handleChange(targetKeys) { this.setState({ targetKeys }); }, @@ -51,6 +54,7 @@ const App = React.createClass({ item.title} diff --git a/components/transfer/index.tsx b/components/transfer/index.tsx index 28f92346be..bd343bab6a 100644 --- a/components/transfer/index.tsx +++ b/components/transfer/index.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import { PropTypes } from 'react'; import List from './list'; import Operation from './operation'; import Search from './search'; @@ -61,6 +62,26 @@ export default class Transfer extends React.Component { footer: noop, }; + static propTypes = { + prefixCls: PropTypes.string, + dataSource: PropTypes.array, + render: PropTypes.func, + targetKeys: PropTypes.array, + onChange: PropTypes.func, + height: PropTypes.number, + listStyle: PropTypes.object, + className: PropTypes.string, + titles: PropTypes.array, + operations: PropTypes.array, + showSearch: PropTypes.bool, + filterOption: PropTypes.func, + searchPlaceholder: PropTypes.string, + notFoundContent: PropTypes.node, + body: PropTypes.func, + footer: PropTypes.func, + rowKey: PropTypes.func, + }; + constructor(props) { super(props); this.state = { @@ -204,7 +225,7 @@ export default class Transfer extends React.Component { const { prefixCls, titles, operations, showSearch, notFoundContent, searchPlaceholder, body, footer, listStyle, className, - render, + filterOption, render, } = this.props; const { leftFilter, rightFilter, leftCheckedKeys, rightCheckedKeys } = this.state; @@ -222,6 +243,7 @@ export default class Transfer extends React.Component { { = 0; } @@ -165,7 +187,7 @@ export default class TransferList extends React.ComponentAnt Design of Angular 2.0
+- +- ## 如何贡献 diff --git a/package.json b/package.json index 050660a937..de81737b27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "1.7.0", + "version": "1.8.0", "title": "Ant Design", "description": "一个 UI 设计语言", "homepage": "http://ant.design/", diff --git a/site/bisheng.config.js b/site/bisheng.config.js index ed955e6444..7a77f6ef4a 100644 --- a/site/bisheng.config.js +++ b/site/bisheng.config.js @@ -4,7 +4,9 @@ function pickerGenerator(module) { const tester = new RegExp(`^docs/${module}`); return (markdownData) => { const filename = markdownData.meta.filename; - if (tester.test(filename) && !/\.en-US\.md/.test(filename)) { + if (tester.test(filename) && + !/\/demo$/.test(path.dirname(filename)) && + !/\.en-US\.md/.test(filename)) { return { meta: markdownData.meta, }; diff --git a/site/theme/static/common.less b/site/theme/static/common.less index d84d0b031f..807cdf86ad 100644 --- a/site/theme/static/common.less +++ b/site/theme/static/common.less @@ -67,11 +67,16 @@ div.main-container { opacity: .67; } +.outside-link { + display: inline-block; +} + .outside-link:after { content: '\E669'; font-family: 'anticon'; margin-left: 5px; font-size: 12px; + color: #aaa; } .outside-link.internal { diff --git a/site/theme/static/markdown.less b/site/theme/static/markdown.less index e38be06685..482950c858 100644 --- a/site/theme/static/markdown.less +++ b/site/theme/static/markdown.less @@ -62,6 +62,9 @@ .markdown ul > li { list-style: circle; + &:empty { + display: none; + } } .markdown > ul li, diff --git a/site/theme/template/Content/Article.jsx b/site/theme/template/Content/Article.jsx index 608d0d1927..70af998b4f 100644 --- a/site/theme/template/Content/Article.jsx +++ b/site/theme/template/Content/Article.jsx @@ -17,6 +17,8 @@ export default class Article extends React.Component { this.pingTimer = utils.ping(checkImgUrl, status => { if (status === 'responded') { links.forEach(link => (link.style.display = 'block')); + } else { + links.forEach(link => link.parentNode.removeChild(link)); } }); }