Files
vxe-table/examples/plugins/table/renderer/content.tsx
2020-11-08 20:20:57 +08:00

29 lines
646 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import VXETable from '../../../../packages/v-x-e-table'
// 创建一个简单的展开内容渲染
VXETable.renderer.add('MyExpand', {
renderExpand (renderOpts, params) {
const { row } = params
return [
<ul>
<li>
<span>ID</span>
<span>{ row.id }</span>
</li>
<li>
<span>Name</span>
<span>{ row.name }</span>
</li>
<li>
<span>UpdateTime</span>
<span>{ row.updateTime }</span>
</li>
<li>
<span>CreateTime</span>
<span>{ row.createTime }</span>
</li>
</ul>
]
}
})