mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
Merge 1.x-stable
This commit is contained in:
commit
da6b65f7f0
24
CHANGELOG.md
24
CHANGELOG.md
@ -13,22 +13,14 @@ timeline: true
|
||||
|
||||
`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` 事件。
|
||||
- 修复可关闭 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)
|
||||
- 修复了 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 和 Radio 现在支持 `onClick` 属性。
|
||||
|
||||
## 1.7.0
|
||||
|
||||
|
@ -62,6 +62,10 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
|
||||
- [组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
|
||||
- [网站和组件开发说明](https://github.com/ant-design/ant-design/wiki/%E7%BD%91%E7%AB%99%E5%92%8C%E7%BB%84%E4%BB%B6%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E)
|
||||
- [版本发布手册](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
|
||||
- [社区贡献脚手架和范例](https://github.com/ant-design/ant-design/issues/129)
|
||||
- [常见问题](https://github.com/ant-design/ant-design/wiki/FAQ)
|
||||
- [CodePen 模板](http://codepen.io/anon/pen/wGOWGW?editors=001)
|
||||
- [Awesome Ant Design](https://github.com/websemantics/awesome-ant-design)
|
||||
|
||||
|
||||
## 如何贡献
|
||||
|
@ -96,8 +96,10 @@ tsconfig.json
|
||||
- [React component design guide](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
|
||||
- [Developer Instruction](https://github.com/ant-design/ant-design/wiki/Development)
|
||||
- [Versioning Release Note](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
|
||||
- [Boilerplates](https://github.com/ant-design/ant-design/issues/129)
|
||||
- [FAQ](https://github.com/ant-design/ant-design/wiki/FAQ)
|
||||
- [CodePen boilerplate](http://codepen.io/anon/pen/wGOWGW?editors=001) for bug reports
|
||||
- [Awesome Ant Design](https://github.com/websemantics/awesome-ant-design)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@ -173,10 +173,6 @@
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.@{checkbox-prefix-cls}-wrapper + span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.@{checkbox-prefix-cls}-group {
|
||||
font-size: @font-size-base;
|
||||
&-item {
|
||||
|
@ -34,6 +34,7 @@ export default class Form extends React.Component {
|
||||
render() {
|
||||
const { prefixCls, className, inline, horizontal, vertical } = this.props;
|
||||
const formClassName = classNames({
|
||||
[`${prefixCls}`]: true,
|
||||
[`${prefixCls}-horizontal`]: horizontal,
|
||||
[`${prefixCls}-vertical`]: vertical,
|
||||
[`${prefixCls}-inline`]: inline,
|
||||
|
@ -67,7 +67,8 @@ input[type="checkbox"] {
|
||||
color: #666;
|
||||
|
||||
// nested FormItem
|
||||
& & {
|
||||
& > &,
|
||||
& :not(.@{form-prefix-cls}) > & {
|
||||
margin-bottom: -@form-item-margin-bottom;
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ export default class Input extends Component {
|
||||
type: 'text',
|
||||
onPressEnter() {},
|
||||
onKeyDown() {},
|
||||
onChange() {},
|
||||
autosize: false,
|
||||
};
|
||||
|
||||
@ -86,10 +87,10 @@ export default class Input extends Component {
|
||||
}
|
||||
|
||||
handleTextareaChange = (e) => {
|
||||
this.resizeTextarea();
|
||||
if (this.props.onChange) {
|
||||
this.props.onChange(e);
|
||||
if (!('value' in this.props)) {
|
||||
this.resizeTextarea();
|
||||
}
|
||||
this.props.onChange(e);
|
||||
}
|
||||
|
||||
resizeTextarea = () => {
|
||||
|
@ -124,7 +124,7 @@ span.@{radio-prefix-cls} + * {
|
||||
margin: 0;
|
||||
height: 28px;
|
||||
line-height: 26px;
|
||||
color: #666;
|
||||
color: @btn-default-color;
|
||||
display: inline-block;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
@ -134,7 +134,7 @@ span.@{radio-prefix-cls} + * {
|
||||
padding: 0 16px;
|
||||
|
||||
a {
|
||||
color: #666;
|
||||
color: @btn-default-color;
|
||||
}
|
||||
|
||||
> .@{radio-prefix-cls}-button {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import RcTabs from 'rc-tabs';
|
||||
import * as React from 'react';
|
||||
const { cloneElement } = React;
|
||||
import { cloneElement, Children } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import Icon from '../icon';
|
||||
|
||||
@ -83,7 +83,7 @@ export default class Tabs extends React.Component<TabsProps, any> {
|
||||
// only card type tabs can be added and closed
|
||||
if (type === 'editable-card') {
|
||||
children = Array.isArray(children) ? children : [children];
|
||||
children = children.map((child, index) => {
|
||||
children = Children.map(children, (child, index) => {
|
||||
return cloneElement(child, {
|
||||
tab: <div>
|
||||
{child.props.tab}
|
||||
|
@ -14,7 +14,7 @@ title:
|
||||
Custom each Transfer Item, and in this way you can render a complex datasource.
|
||||
|
||||
````jsx
|
||||
import { Transfer, Icon } from 'antd';
|
||||
import { Transfer } from 'antd';
|
||||
|
||||
const App = React.createClass({
|
||||
getInitialState() {
|
||||
@ -49,9 +49,9 @@ const App = React.createClass({
|
||||
},
|
||||
renderItem(item) {
|
||||
const customLabel = (
|
||||
<div className="custom-item">
|
||||
{item.title} - {item.description} <Icon type="android" />
|
||||
</div>
|
||||
<span className="custom-item">
|
||||
{item.title} - {item.description}
|
||||
</span>
|
||||
);
|
||||
|
||||
return {
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
.@{transfer-prefix-cls} {
|
||||
position: relative;
|
||||
line-height: @line-height-base;
|
||||
|
||||
&-list {
|
||||
font-size: 12px;
|
||||
@ -64,7 +65,6 @@
|
||||
|
||||
&-body {
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
|
@ -80,6 +80,9 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
|
||||
- [组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
|
||||
- [设计规范速查手册](https://os.alipayobjects.com/rmsportal/HTXUgPGkyyxEivE.png)
|
||||
- [社区贡献脚手架和范例](https://github.com/ant-design/ant-design/issues/129)
|
||||
- [常见问题](https://github.com/ant-design/ant-design/wiki/FAQ)
|
||||
- [CodePen 模板](http://codepen.io/anon/pen/wGOWGW?editors=001)
|
||||
- [Awesome Ant Design](https://github.com/websemantics/awesome-ant-design)
|
||||
|
||||
## 谁在使用
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user