<t-table
:rowAttributes='rowAttributes'
:key="tkey"
style='width:70vh;'
bordered
row-key="index"
:columns="columns"
:data="index"
dragSort="row-handler"
@drag-sort="onDragSort"
></t-table>
重点是这个rowAttributes,
写法比较奇怪,试了好久才试出来:
rowAttributes(a){
console.log(a,'00000000');
return [{ style: `background-color:${a.row.bg_color} !important`}]
},
如果return的是一个对象,渲染到页面最终的变成【object,object】