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'}};;
            }
}

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM