table表格 如何加卡片 实现?

简介: table表格 如何加卡片 实现?

实现非常简单

代码

 const columnsinsu = [
        {
            dataIndex: 'nowdate',
            key: 'nowdate',
            render: (text, record) =>
                <Card
                    hoverable
                    style={{
                        width: '97%',
                        height: 90,
                    }}
                // cover={<img alt="example" src="https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png" />}
                >
                    <div style={{ 'display': 'flex' }}>
                        <div style={{ 'borderRight': '1px solid lightgray', 'textAlign': 'center', 'width': '12%' }}>
                            <h3><BarChartOutlined style={{ 'color': '#409EFF' }} />{text}</h3>
                        </div>
                        <div>
                            <div style={{ 'textAlign': 'center', 'borderRight': '1px solid lightgray', 'marginLeft': '30px', 'width': '100%' }}>公司社保金额<h3>{record.gr_social}</h3></div>
                        </div>
                        <div>
                            <div style={{ 'textAlign': 'center', 'borderRight': '1px solid lightgray', 'marginLeft': '30px', 'width': '100%' }}>个人社保金额<h3>{record.gr_social}</h3></div>
                        </div>
                        <div>
                            <div style={{ 'textAlign': 'center', 'borderRight': '1px solid lightgray', 'marginLeft': '30px', 'width': '100%' }}>参保人数<h3>{record.staff_num}</h3></div>
                        </div>
                        <div>
                            <div onClick={() => { insurRow(record) }} style={{ 'textAlign': 'right', 'marginLeft': '330px' }}>查看凭证</div>
                        </div>
                    </div>
                </Card>
        },

这个对象是 table表格的 标题   render渲染的是表格的内容   不加render的话里面的key和dataindex就是 table表格中的内容  render 加上标签 的话可以说是覆盖key  和dataindex

的渲染内容

相关文章
|
8月前
|
JSON 前端开发 数据格式
bootstrap table表格的点击详情按钮操作
bootstrap table表格的点击详情按钮操作
60 1
|
8月前
layUI数据表格可编辑扩展下拉框
layUI数据表格可编辑扩展下拉框
119 0
|
26天前
|
JavaScript 前端开发
table表格和下拉组件中data为什么必须是一个函数?
table表格和下拉组件中data为什么必须是一个函数?
|
2月前
elementUI 写一个表头列名、表体单元格样式、翻页器相对较为动态的表格el-table
elementUI 写一个表头列名、表体单元格样式、翻页器相对较为动态的表格el-table
elementUI 写一个表头列名、表体单元格样式、翻页器相对较为动态的表格el-table
|
2月前
后台管理系统之Table表格展示数据的使用
后台管理系统之Table表格展示数据的使用
64 0
|
8月前
|
JavaScript
layUI数据表格可编辑扩展日期框
layUI数据表格可编辑扩展日期框
|
12月前
|
SQL 自然语言处理 搜索推荐
|
存储 API
【ElementUI】Table表格动态合并
【ElementUI】Table表格动态合并
177 0
|
监控 数据可视化 前端开发
S2 1.0:这个表格 「不简单」
S2 1.0:这个表格 「不简单」
236 0
|
存储 前端开发 数据库
el-table表格拖动列记住列宽度功能(刷新页面还在)
el-table表格拖动列记住列宽度功能(刷新页面还在)
310 0