2017-08-30 11:18:38 +08:00
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @title 无数据时显示
|
2017-10-12 16:54:17 +08:00
|
|
|
|
* @description 无数据时显示效果展示(可自定义)
|
2017-09-29 16:04:08 +08:00
|
|
|
|
*
|
|
|
|
|
* import {Table} from 'tinper-bee';
|
2017-08-30 11:18:38 +08:00
|
|
|
|
*/
|
|
|
|
|
|
2017-09-08 15:07:55 +08:00
|
|
|
|
|
2017-08-30 13:31:26 +08:00
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import Table from '../../src';
|
|
|
|
|
|
2017-09-08 15:07:55 +08:00
|
|
|
|
|
2017-08-30 11:18:38 +08:00
|
|
|
|
const columns10 = [
|
|
|
|
|
{
|
|
|
|
|
title: "Name",
|
|
|
|
|
dataIndex: "name",
|
|
|
|
|
key: "name",
|
|
|
|
|
width: "40%"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Age",
|
|
|
|
|
dataIndex: "age",
|
|
|
|
|
key: "age",
|
|
|
|
|
width: "30%"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "Address",
|
|
|
|
|
dataIndex: "address",
|
|
|
|
|
key: "address"
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const data10 = [
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const emptyFunc = () => <span>这里没有数据!</span>
|
|
|
|
|
|
|
|
|
|
class Demo10 extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
return <Table columns={columns10} data={data10} emptyText={emptyFunc} />;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-08-30 13:31:26 +08:00
|
|
|
|
|
2017-09-08 15:07:55 +08:00
|
|
|
|
export default Demo10;
|