layui.use('table', function(){
var table = layui.table;
//执行渲染
table.render({
elem: '#table1',
url: '/demo/table/user/',
cols: [[
{field:'id', title:'ID', width:80},
{field:'username', title:'用户名', width:120},
{field:'email', title:'邮箱', minWidth:150},
{field:'sex', title:'性别', width:80, sort:true},
{field:'city', title:'城市', width:100},
{field:'sign', title:'签名', minWidth:150},
{field:'status', title:'状态', width:80, templet: '#statusTpl', unresize: true},
{field:'experience', title:'积分', width:80, sort: true},
{field:'score', title:'评分', width:80, sort: true},
{field:'classify', title:'职业', width:100},
{field:'wealth', title:'财富', width:135, sort: true},
]],
done: function(res, curr, count){
var bodyHeight = $('.layui-table-main').height(); //获取表格主体的高度
console.log("表格主体的高度为:" + bodyHeight);
}
});
});
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!