bootstrap-table 行合并和列合并,以及固定列宽度等问题
2024-10-19 16:23:26
列合并和列宽度固定:
.setWidth {
table-layout: fixed;
} .setWidth > thead > tr > th {
width: 80px;
}
<table class="setWidth" id="EstateTable" data-mobile-responsive="true">
<colgroup>
<col style="width:36px;" />
<col style="width:17%" />
<col style="width:48px;" />
<col style="width:60px;" />
<col style="width:12%;" />
@*<col style="width:7%;" />
<col style="width:7%;" />*@
<col style="width:6%;" />
<col style="width:144px;" />
<col style="width:48px;" />
<col style="width:48px;" />
<col style="width:6%;" />
<col style="" />
</colgroup>
<thead> <tr>
<th data-field="state" style="width:36px;" data-checkbox="true"></th>
<th data-field="EstateType" data-visible="false">盘源类型ID</th>
<th data-field="ID" data-visible="false">ID</th>
<th data-field="EstateName" data-formatter="nameFormatter">楼盘名称</th>
<th data-field="EstateTypeDisplay">类型</th>
<th data-field="Address" style="width:60px;" align="center">城区</th>
<th data-field="Developer">发展商</th> @*<th data-field="EstateModeDisplay">楼宇类型</th>*@
@*<th data-field="Area">占地面积</th>
<th data-field="ConstrctionArea">建筑面积</th>*@
@*<th data-field="ProjectProxyModeDisplay">代理类型</th>*@
<th data-field="RegisterName">跟进人</th>
<th data-field="RegisteDate">登记时间</th>
<th data-field="FollowLevelDisplay">评级</th>
<th data-field="BusinessCard" data-formatter="imgFormatter">名片</th>
<th data-field="AuthStatusDisplay" data-formatter="actionFormatter">状态</th>
<th data-field="operation" width="120px;" data-formatter="operateFormatter">操作</th> </tr>
</thead>
</table>
行合并:
$('#EstateTable').bootstrapTable({
url: '/table/tableStyle',
method:'post',
pagination: true, //分页
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*)
pageList: [10, 25, 50, 100], //可供选择的每页的行数(*)
search: false, //显示搜索框
sidePagination: "server"
onLoadSuccess: function (data) {
$('#EstTable').bootstrapTable('mergeCells', {index: 1, field: 'name', rowspan: 3});
}
});
最新文章
- Python mock
- WIN7凭据管理器保存的凭据过段时间会自动删除的解决办法
- codeforces 518B. Tanya and Postcard 解题报告
- C语言实现二叉树-02版
- Android之SQLite
- aspose.cell 自定义模板 SUM无效
- Linux下oracle导入(exp)导出(imp)出现";Failed to open ...for reader/write";错误
- 【JS】Beginner1:Making Stuff Happen
- mysql常见错误码
- Android锁定EditText内容和随机生成验证码
- jQuery 插件 的this 指向问题(实战)
- linux 存储技术 部署iSCSI NFS Multipath多路径
- asp.net-基础-20180319
- HTML5 CSS3 诱人的实例 : 网页加载进度条的实现,下载进度条等
- [PA2014]Zadanie
- UVA1160 X-Plosives
- c/c++基础 const
- IDEA重写toString()模板,转成json格式
- unity 质量设置 Quality Settings
- php性能优化二(PHP配置php.ini)