thymeleaf 和layui表格都对[[]] 有定义,thymeleaf定义比较严格,layui比较宽松,html 页面中把[ [] ] 加空格或则换行就可以解决
table.render({
elem: ‘#all_tms‘
, url: ‘/tms/getAllTms/‘
, toolbar: ‘#toolbarDemo‘ //开启头部工具栏,并为其绑定左侧模板
, defaultToolbar: [‘filter‘, ‘exports‘, ‘print‘]
, title: ‘用户数据表‘
// , where: {‘typeid‘: typeindex}
, height: ‘full-100‘
, cols: [ [
{type: ‘checkbox‘, fixed: ‘left‘}
, {type: ‘numbers‘, title: ‘序号‘, fixed: ‘left‘}
, {field: ‘name‘, title: ‘设备名称‘, width: 180, fixed: ‘left‘, sort: true}
] ]
原文:https://www.cnblogs.com/liuxb1204/p/14657147.html