The main problem is: I remembered that I could $indexpass an index and it would be easy to handle. How do I know which row of data is currently being rendered by tr? How to use computedDo
You are using the element-ui framework, add class in el-table里有这么一个属性row-class-name,是一个回调函数,可以给table-cell. For details, you can check out the official website, at the bottom. For example: (display different background colors by judging the value in a row of data) template
Write the style and then bind it dynamically: class ="{green:true,red:false....}"
You are using the element-ui framework, add class in
el-table
里有这么一个属性row-class-name
,是一个回调函数,可以给table-cell
. For details, you can check out the official website, at the bottom.For example: (display different background colors by judging the value in a row of data)
template
script
style
Effect: