我是靠谱客的博主 舒心冬瓜,这篇文章主要介绍bootstrap table表格高度随电脑分辨率变化表格高度随电脑分辨率变化,现在分享给大家,希望可以做个参考。

表格高度随电脑分辨率变化


var templateTableParams = {
classes: "table table-bordered table-hover",
cache: false,
//是否使用缓存,默认为true
striped: true,
//是否显示行间隔色
singleSelect: true,
//单选
clickToSelect: true,
//是否启用点击选中行
showFooter: true,//合计
columns: [
{
checkbox: true,
footerFormatter: function (value) {
return '合计';
}
},
{
title: "序号", field: 'id', halign: "center", width: '50px', formatter: function (value, row, index) {
return index + 1;
}
},
{field: 'jhyc', title: "计划月次", width: '70px', halign: "center", formatter: 'paramsMatter'},
{field: 'lxdh', title: "计划单号", width: '100px', halign: "center", formatter: 'paramsMatter'},
{field: 'gyfl', title: "物资分类", align: 'center', width: '100px', halign: "center"},
{
field: 'itemCode',
title: "物资编码",
width: '200px',
sortable: true,
halign: "center",
formatter: 'paramsMatter'
},
{
field: 'itemName',
title: "物资名称",
width: '100px',
sortable: true,
halign: "center",
formatter: 'paramsMatter'
}
],
cardView: (function () {
return /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
})(),
onlyInfoPagination: false,//显示总记录数
必须打开pagination=true
pagination: false,
//显示分页
pageNumber: 1,
//初始化加载第一页,默认第一页
pageSize: 10,
//每页记录数
pageList: [5, 10, 20],
//可供选择的每页的行数
idField: 'id',
uniqueId: 'id',
smartDisplay: false,
onClickCell: function (field, value, row, $element) {
if (field === "orderQtyLastYear") {
itemCodes = row.itemCode;
orderOtyLastYearModal();
}
},
onPostBody: function (data) {
merge_footer();
}
}
//高度设置
var trueHeight = document.documentElement.clientHeight - 5;
var startHeight = document.body.offsetHeight;
templateTableParams.height =
trueHeight - startHeight;
//表格初始化
$('#purchasePlanManage_table').bootstrapTable(templateTableParams);

最后

以上就是舒心冬瓜最近收集整理的关于bootstrap table表格高度随电脑分辨率变化表格高度随电脑分辨率变化的全部内容,更多相关bootstrap内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(163)

评论列表共有 0 条评论

立即
投稿
返回
顶部