建站行业成为买方市场,网站企业有哪些,温州敎玩具网站建设,哪些网站适合瀑布流斑马条纹
对于element-ui是有个stripe斑马条纹的属性的#xff0c;最终呈现的效果如下#xff1a; antd-table中是没有这个属性的#xff0c;但是可以通过rowClassName#xff1a;可以给对应行添加指定类名。 实现方法#xff1a;
a-table:rowClassNamegetRo…斑马条纹
对于element-ui是有个stripe斑马条纹的属性的最终呈现的效果如下 antd-table中是没有这个属性的但是可以通过rowClassName可以给对应行添加指定类名。 实现方法
a-table:rowClassNamegetRowClassNamesizesmall:dataSourcetableData:rowKey(row) row.idbordered:scroll{ y: 430 }:paginationfalse:columnscolumns
/a-tablegetRowClassName(row,index){if (index % 2 0) {return evenCls;}
}/deep/.ant-table-body table .ant-table-tbody tr.evenCls td {background: #fff9e6;
}
/deep/.ant-table-body table .ant-table-tbody tr:hover td {background: #fff;
}最终效果图
单选——最简单的方式
a-tablestylemargin-top: 10px:dataSourcetableData:rowKey(row) row.id:scroll{ x: 1000, y: 500 }bordered:paginationpaginationchangechangeTable:columnscolumns:row-selection{selectedRowKeys: selectedRowKeys,onChange: onSelectChange,}
/a-tableonSelectChange(selectedRowKeys) {this.selectedRowKeys selectedRowKeys;
},完成