2.4.1
macos google chrome 67.0.3396.87
2.5.17-beta.0
https://jsfiddle.net/zwmcaydn/1/
just run the jsfiddle code
rows rowIndex to have green and yellow colors
el-table stripe takes preference over table row status
You may need to give it higher precedence: https://jsfiddle.net/zwmcaydn/8/
~I create a PR to reduce the priority of stripe class, but the CSS which you write in jsfiddle still need to be modified.~
.el-table .warning-row td {
background: oldlace;
}
.el-table .success-row td {
background: #f0f9eb;
}
same issue, but
give it higher precedence
provided by @jikkai not worked for me.
I write an new style and solved:
//open an new style block
<style>
.el-table .warning-row {
background: oldlace;
}
.el-table .success-row {
background: #f0f9eb;
}
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "@/styles/variables.scss";
//other style
</style>
but I do not understand why this way worked. can you explain? @jikkai thanks!!!
@feichangtutu
This is your case: https://jsfiddle.net/zwmcaydn/14/
- <el-table :data="tableData2" :row-class-name="tableRowClassName" stripe>
+ <el-table :data="tableData2" :row-class-name="tableRowClassName">
<el-table-column prop="date" label="Date" width="180">
</el-table-column>
<el-table-column prop="name" label="Name" width="180">
</el-table-column>
<el-table-column prop="address" label="Address">
</el-table-column>
</el-table>
but I do not understand why this way worked. can you explain? @jikkai thanks!!!
but I still do not understand why this way worked. can you explain?
i fixed this prblem, i show my code now, drop "scoped" from
<el-table :data="tableData" style="width: 100%" border=true :row-class-name="tableRowClassName">

Most helpful comment
i fixed this prblem, i show my code now, drop "scoped" from