bee-table6/demo/demolist/Demo0102.js

44 lines
851 B
JavaScript
Raw Normal View History

2019-04-15 20:14:02 +08:00
/**
*
* @title 默认无数据展示
2019-04-18 10:50:38 +08:00
* @parent 基础 Basic
2019-04-15 20:14:02 +08:00
* @description 无数据时显示效果展示可自定义
2019-04-16 13:35:25 +08:00
*
2019-04-15 20:14:02 +08:00
*/
import React, { Component } from 'react';
import Table from '../../src';
import Icon from 'bee-icon';
2019-04-16 13:35:25 +08:00
const columns02 = [
2019-04-15 20:14:02 +08:00
{
title: "员工编号",
dataIndex: "num",
key: "num",
2019-04-15 20:14:02 +08:00
width: "40%"
},
{
title: "员工姓名",
dataIndex: "name",
key: "name",
2019-04-15 20:14:02 +08:00
width: "30%"
},
{
title: "部门",
dataIndex: "department",
key: "department"
2019-04-15 20:14:02 +08:00
}
];
2019-04-15 20:14:02 +08:00
const data02 = [];
2019-04-15 20:14:02 +08:00
const emptyFunc = () => <Icon type="uf-nodata"></Icon>
2019-04-15 20:14:02 +08:00
2019-04-16 13:35:25 +08:00
class Demo02 extends Component {
render() {
return <Table className="demo02" columns={columns02} data={data02} emptyText={emptyFunc} />;
2019-04-15 20:14:02 +08:00
}
2019-04-16 13:35:25 +08:00
}
2019-04-15 20:14:02 +08:00
2019-04-16 13:35:25 +08:00
export default Demo02;