This commit is contained in:
afc163 2016-07-21 18:10:13 +08:00
commit a72d9ec381
14 changed files with 44 additions and 18 deletions

View File

@ -262,7 +262,7 @@ timeline: true
这里的改动在升级后控制台会出现警告提示,请按提示进行修改。
- 废弃 QueueAnim可以直接 import [rc-queue-anim](https://github.com/react-component/queue-anim) 用以代替。Ant Design 的动效方案已移至 [Ant Motion](http://motion.ant.design/#/components/queue-anim),欢迎前往探索。
- 废弃 QueueAnim可以直接 import [rc-queue-anim](https://github.com/react-component/queue-anim) 用以代替。Ant Design 的动效方案已移至 [Ant Motion](http://motion.ant.design/components/queue-anim),欢迎前往探索。
- Affix 的 `offset` 属性重命名为 `offsetTop`
- Popover 的 `overlay` 属性重命名为 `content`
- Progress.Line 使用方式改为 `<Progress />``<Progress type="line" />`

View File

@ -45,7 +45,7 @@ function getListData(value) {
}
function dateCellRender(value) {
let listData = getListData(value);
const listData = getListData(value);
return (
<ul className="events">
{

View File

@ -16,7 +16,7 @@ Display a global loading indicator, which is dismissed by itself asynchronously.
````jsx
import { message, Button } from 'antd';
const success = function () {
const success = () => {
let hide = message.loading('Action in progress..', 0);
// Dismiss manually and asynchronously
setTimeout(hide, 2500);

View File

@ -25,7 +25,7 @@ const Test = React.createClass({
});
},
onAdd() {
let items = this.state.items;
const items = this.state.items;
items.push(<li key={Date.now()}></li>);
this.setState({
show: true,
@ -33,7 +33,7 @@ const Test = React.createClass({
});
},
onRemove() {
let items = this.state.items;
const items = this.state.items;
items.splice(items.length - 1, 1);
this.setState({
show: true,

View File

@ -16,7 +16,7 @@ english: QueueAnim
## API
> 此组件 `antd@1.0.0+` 后标记为废弃,您可以直接使用 `import QueueAnim from 'rc-queue-anim'` 来代替,相关文档也已移到 [ant-motioin](http://motion.ant.design/#/components/queue-anim)。
> 此组件 `antd@1.0.0+` 后标记为废弃,您可以直接使用 `import QueueAnim from 'rc-queue-anim'` 来代替,相关文档也已移到 [ant-motioin](http://motion.ant.design/components/queue-anim)。
> [ant-motioin](http://motion.ant.design/) 是一个动效设计语言,欢迎关注。

View File

@ -6,7 +6,7 @@ export default class QueueAnim extends React.Component {
componentDidMount() {
warning(false, '`QueueAnim` is deprecated, ' +
'you can import QueueAnim from \'rc-queue-anim\' directly.' +
'The Demo will be moved to http://motion.ant.design/#/component/queue-anim');
'The Demo will be moved to http://motion.ant.design/component/queue-anim');
}
render() {
return <RcQueueAnim {...this.props} />;

View File

@ -1,9 +1,9 @@
---
order: 10
title: 边框和页脚
title: 边框,页头和页脚
---
添加表格边框线和页脚。
添加表格边框线,页头和页脚。
````jsx
import { Table } from 'antd';
@ -40,8 +40,13 @@ const data = [{
address: '西湖区湖底公园1号',
}];
ReactDOM.render(<Table columns={columns} dataSource={data} bordered footer={() => '页脚'} />
, mountNode);
ReactDOM.render(<Table
columns={columns}
dataSource={data}
bordered
title={() => '页头'}
footer={() => '页脚'}
/>, mountNode);
````
````css

View File

@ -13,7 +13,7 @@ import { Table } from 'antd';
// 事例表中第四行合并了五列,除了第一列设置 colSpan = 5 外
// 其他列的第四行 colSpan = 0 (被合并掉,不会渲染)
const renderContent = function (value, row, index) {
let obj = {
const obj = {
children: value,
props: {},
};
@ -46,7 +46,7 @@ const columns = [{
colSpan: 2,
dataIndex: 'tel',
render(value, row, index) {
let obj = {
const obj = {
children: value,
props: {},
};

View File

@ -72,6 +72,7 @@ const columns = [{
| bordered | 是否展示外边框和列边框 | Boolean | false |
| showHeader | 是否显示表头 | Boolean | true |
| footer | 表格底部自定义渲染函数 | Function(currentPageData) | |
| title | 表格头部自定义渲染函数 | Function(currentPageData) | |
| scroll | 横向或纵向支持滚动,也可用于指定滚动区域的宽高度:`{{ x: true, y: 300 }}` | Object | - |
### Column

View File

@ -75,6 +75,26 @@
border: 1px solid @border-color-split;
}
&-title {
padding: 16px 8px;
position: relative;
top: 1px;
border-radius: @border-radius-base @border-radius-base 0 0;
}
&.@{table-prefix-cls}-bordered &-title {
border: 1px solid @border-color-split;
}
&-title + &-content {
position: relative;
table {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
tr.@{table-prefix-cls}-row-selected {
background: #fafafa;
}

View File

@ -9,7 +9,7 @@ title: 禁止选项
import { TimePicker } from 'antd';
function newArray(start, end) {
let result = [];
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
@ -17,7 +17,7 @@ function newArray(start, end) {
}
function disabledHours() {
let hours = newArray(0, 60);
const hours = newArray(0, 60);
hours.splice(20, 4);
return hours;
}

View File

@ -9,7 +9,7 @@ title: 只显示部分选项
import { TimePicker } from 'antd';
function newArray(start, end) {
let result = [];
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}

View File

@ -77,4 +77,4 @@ english: 巧用过渡
## 自然运动
参见 [Ant Motion 动画语言](http://motion.ant.design/#/language/)。
参见 [Ant Motion 动画语言](http://motion.ant.design/language/time)。

View File

@ -61,7 +61,7 @@
"rc-slider": "~3.7.4",
"rc-steps": "~2.1.5",
"rc-switch": "~1.4.2",
"rc-table": "~4.3.9",
"rc-table": "~4.4.0",
"rc-tabs": "~5.9.2",
"rc-time-picker": "~1.1.6",
"rc-tooltip": "~3.4.2",