自定义行颜色Jquery引导网格
使用jQueryBootGrid和默认状态映射可以工作成功、信息、警告、错误,但在我自定义它的那一刻,它就不工作了。这个问题的解决方案在我的情况下不起作用: 下面是我对脚本的初始化自定义行颜色Jquery引导网格,jquery,jquery-bootgrid,Jquery,Jquery Bootgrid,使用jQueryBootGrid和默认状态映射可以工作成功、信息、警告、错误,但在我自定义它的那一刻,它就不工作了。这个问题的解决方案在我的情况下不起作用: 下面是我对脚本的初始化 $(document).ready(function(){ $("#client_list").bootgrid({ css: { icon: "zmdi icon", iconColumns: "zmdi-view-module",
$(document).ready(function(){
$("#client_list").bootgrid({
css: {
icon: "zmdi icon",
iconColumns: "zmdi-view-module",
iconDown: "zmdi-sort-amount-desc",
iconRefresh: "zmdi-refresh",
iconUp: "zmdi-sort-amount-asc"
},
ajax: true,
post: function(){
return { id: "b0df282a-c9e93b7befee" };
},
url: "get_logview/client/client",
caseSensitive: false,
selection: false,
multiSelect: true,
rowSelect: true,
searchSettings: {
delay: 100,
characters: 3
},
keepSelection: true,
statusMappings: {
4: "loglow",
5: "logmediumlow",
6: "logmedium",
7: "logmediumhigh",
8: "loghigh",
9: "logcritical",
10: "logcatastrophic"
}
});
});
我的数据包含正确的状态值,如下所示:
{
"current": 1,
"rowCount": "10",
"rows": [
{
"id": "1",
"type": "Notice",
"message": "User 127.0.0.1 (User ID: 1) accessed the logs.",
"impact": "Low",
"user": "127.0.0.1 (User ID: 1)",
"createdate": "2016-07-20 19:39:03",
"status": 4
},
{
"id": "2",
"type": "Notice",
"message": "User 127.0.0.1 (User ID: 1) accessed the logs.",
"impact": "Low",
"user": "127.0.0.1 (User ID: 1)",
"createdate": "2016-07-20 19:39:03",
"status": 4
}
],
"total": "2"
}
有人能告诉我我做错了什么吗?没有控制台错误,将显示bootgrid表,但不会显示自定义颜色。发现问题:初始化必须是statusMapping,而不是statusMappings。插件的文档不正确:
将相应地在Github上提交错误报告。发现了问题:初始化必须是statusMapping,而不是statusMappings。插件的文档不正确: 将在Github上提交相应的bug报告