layuiのテーブルスタイルの修正方法


以下の通りです

layui.use('table', function () {
 var table = layui.table;
 
 table.render({
  elem: '#desTable'
  , url: '${ctx}/alarm/queryEventShowScatter'
  , even: true
  , page: { //     laypage        (      , :jump/elem) -     
  layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //       
  //,curr: 5 //       5  
  , groups: 1 //    1      
  , first: false //     
  , last: false //     
 
  }
  , cols: [[
  {field: 'id', width: '15%', title: '1', style: 'background-color: #5FB878; color: #fff'}
  , {field: 'srcip', width: '15%', title: '2', style: 'background-color: #5FB878; color: #fff'}
  , {field: 'logtime', width: '20%', title: '3', style: 'background-color: #5FB878; color: #fff'}
  , {field: 'lasttime', width: '20%', title: '4', style: 'background-color: #5FB878; color: #fff'}
  , {field: 'count', width: '15%', title: '5', style: 'background-color: #5FB878; color: #fff'}
  , {field: 'percent', width: '15%', title: '6', style: 'background-color: #5FB878; color: #fff'}
  ]],
  done: function (res, curr, count) {
  $('tr').css({'background-color': '#009688', 'color': '#fff'});
  }
 
 });
 });
done:function()メソッドは、ロードが完了した時に折り返し、jqueryでスタイルを変更します。
以上のlayuiの中でtableの表の頭の形の改正の方法は小さい編がみんなのすべての内容に分かち合うので、みんなに1つの参考をあげることができることを望んで、みんながよけいに私達を支持することをも望みます。