2018-03-27 14:41:41 +00:00
|
|
|
/* eslint-disable no-console,func-names,react/no-multi-comp */
|
|
|
|
import Table from '../index'
|
|
|
|
import '../assets/index.less'
|
|
|
|
|
|
|
|
const { ColumnGroup, Column } = Table
|
|
|
|
|
|
|
|
const data = [
|
|
|
|
{ a: '123', key: '1' },
|
|
|
|
{ a: 'cdd', b: 'edd', key: '2' },
|
|
|
|
{ a: '1333', c: 'eee', d: 2, key: '3' },
|
|
|
|
]
|
|
|
|
|
|
|
|
export default {
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<h2>JSX table</h2>
|
|
|
|
<Table data={data}>
|
2018-03-29 10:18:41 +00:00
|
|
|
<ColumnGroup>
|
|
|
|
<span slot='title'>Bazingakkkk</span>
|
2018-03-27 14:41:41 +00:00
|
|
|
<Column
|
|
|
|
title='title1'
|
|
|
|
dataIndex='a'
|
|
|
|
key='a'
|
|
|
|
width={100}
|
|
|
|
/>
|
|
|
|
<Column
|
|
|
|
id='123'
|
|
|
|
title='title2'
|
|
|
|
dataIndex='b'
|
|
|
|
key='b'
|
|
|
|
width={100}
|
|
|
|
/>
|
|
|
|
</ColumnGroup>
|
|
|
|
<Column
|
|
|
|
title='title3'
|
|
|
|
dataIndex='c'
|
|
|
|
key='c'
|
|
|
|
width={200}
|
|
|
|
/>
|
|
|
|
<Column
|
|
|
|
title='Operations'
|
|
|
|
dataIndex=''
|
|
|
|
key='d'
|
2018-03-29 10:18:41 +00:00
|
|
|
// render={() => <a href='#'>Operations</a>}
|
|
|
|
scopedSlots= {
|
2018-04-01 04:52:27 +00:00
|
|
|
{ default: () => <a href='#'>Operations</a> }
|
2018-03-29 10:18:41 +00:00
|
|
|
}
|
|
|
|
>
|
|
|
|
</Column>
|
2018-03-27 14:41:41 +00:00
|
|
|
</Table>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
},
|
|
|
|
}
|