import { BeTable, BeTableColumn} from '@brewer/beerui'
const indexMethod = (index) => {
return index * 2;
}
const tableData = [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}]
const placeholderRegexHandle = (v) => v === undefined || v === 'undefined'
<BeTable data={tableData} placeholder="-" placeholderRegex={placeholderRegexHandle} indexMethod={indexMethod}>
<BeTableColumn width="600" type="index" prop='index' label='索引' />
<BeTableColumn align='center' headeralign='left' width="355" prop='name' label='姓名' />
<BeTableColumn prop='placeholder' label='placeholder' />
<BeTableColumn prop="date" label="日期" />
<BeTableColumn prop="address" label="地址" />
</BeTable>