BootstrapTable 列背景颜色以及字体颜色
1、使用的单元格属性cellStyle
- column:[
- {
- field: \'birthday\',
- title: \'生日\',
- align: \'center\',
- cellStyle: columnColorFunction
- }
- ]
- function columnColorFunction (value, row, index) {
- if (value == "1999-02-11") {
- //字体颜色
- return {css:{\'color\':\'#ed5565\'}};
- } else {
- //背景颜色
- return {css:{\'background-color\':\'#ed5565\'}};;
- }
- }
版权声明:本文为wongzzh原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。