table.render({ elem: '#test-table-comelist' ,url: layui.setter.base + 'list/comelist' ,cols: [[]] ,done: function(res, curr, count){ var mycars=new Array(); var tit=res.nem; var strs= new Array(); strs=tit.split(","); for (var i=0;i<strs.length;i++) { mycars[i]={field:'ex'+i, title:strs[i], align:'center','120'}; } table.init('test-table-comelist',{ cols:[mycars] ,data:res.data ,limit:1000 }); } })