例如:

layui.use('table', function(){
var table = layui.table;

table.render({

elem: '#test'
,url:'/user/getUser'
,cellMinWidth: 80
,method: 'post'
,cols: [[
{field:'id', width:80, title: 'ID'}
]]
});
});

解决方法:

将[[]]换行成

[

  [

  ]

]

posted on 2019-09-03 13:40  yunfeng007  阅读(491)  评论(0编辑  收藏  举报