ant design vue a-table使用时设置表头样式以及padding,更新时间的排序,tooltip
//隔行变色::v-deep .ant-table-tbody .ant-table-row:nth-child(odd) {background-color: ;}::v-deep .ant-table-tbody .ant-table-row:nth-child(even) {background: ;}// 标题背景色用important::v-deep .ant-table-thead &
·
//隔行变色
::v-deep .ant-table-tbody .ant-table-row:nth-child(odd) {
background-color: ;
}
::v-deep .ant-table-tbody .ant-table-row:nth-child(even) {
background: ;
}
// 标题背景色用important
::v-deep .ant-table-thead > tr > th {
padding-left: px;
font-size: px;
color: ;
background: # !important;
}
//设置padding
::v-deep .ant-table-body {
padding-left: px;
}
}
//更新时间的排序
computed:{
columns () {
const columns = {
{
title: '时间',
dataIndex: 'updateTime',
key: 'updateTime',
sorter: (a, b) => {
console.log('00000', Date.parse(a.updateTime), b)
return Date.parse(a.updateTime) - Date.parse(b.updateTime)
}
},
},
return columns
}
//:title
<a-tooltip placement="topLeft" :title="record.orgName" arrow-point-at-center>
{{record.orgName}}
</a-tooltip>
更多推荐
已为社区贡献2条内容
所有评论(0)