Home  >  Article  >  Web Front-end  >  Bootstrap issues about cellStyle and formatter in table

Bootstrap issues about cellStyle and formatter in table

一个新手
一个新手Original
2017-10-02 09:45:587599browse

When the company does projects, it needs to use different tables in the bootstrap table, and display different background colors according to the situation.

Error reporting function:

function color(value,row,index){
		if(row.appid==2){//已经提交数据,颜色变化
			return {
				css:{
					'background':'#F0E68C'
				}
			}
		}
	}

Error reporting content:


##Modified function:

function color(value,row,index){
		if(row.appid==2){//已经提交数据,颜色变化
			return {
				css:{
					'background':'#F0E68C'
				}
			}
		}
		return {};
	}

bootstrap table , this kind of custom function must have a return value.

The above is the detailed content of Bootstrap issues about cellStyle and formatter in table. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn