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月前
layUI数据表格可编辑扩展下拉框
layUI数据表格可编辑扩展下拉框
120 0
|
1月前
|
JavaScript 前端开发
table表格和下拉组件中data为什么必须是一个函数?
table表格和下拉组件中data为什么必须是一个函数?
|
2月前
elementUI 写一个表头列名、表体单元格样式、翻页器相对较为动态的表格el-table
elementUI 写一个表头列名、表体单元格样式、翻页器相对较为动态的表格el-table
elementUI 写一个表头列名、表体单元格样式、翻页器相对较为动态的表格el-table
|
2月前
|
前端开发 小程序
使用element UI-table表格列宽自适应 【已解决】
使用element UI-table表格列宽自适应 【已解决】
136 0
|
2月前
后台管理系统之Table表格展示数据的使用
后台管理系统之Table表格展示数据的使用
65 0
|
8月前
element Table表格隐藏列
element Table表格隐藏列
178 0
Element-ui 表格 (Table) 组件中动态合并单元格
Element-ui 表格 (Table) 组件中动态合并单元格
626 0
Element-ui 表格 (Table) 组件中动态合并单元格
|
12月前
|
SQL 自然语言处理 搜索推荐
|
监控 数据可视化 前端开发
S2 1.0:这个表格 「不简单」
S2 1.0:这个表格 「不简单」
238 0
|
存储 前端开发 数据库
el-table表格拖动列记住列宽度功能(刷新页面还在)
el-table表格拖动列记住列宽度功能(刷新页面还在)
313 0