我使用的是文智信的bootstrap-table模块。(http://bootstrap-table.wenzhixin.net.cn/)
当我使用JSON加载引导数据库表时,字段为null,如下所示:"MyField":null
我看到一个破折号或连字符(-)插入到空的表格单元格中。关闭它的最好方法是什么?
编辑:示例https://jsfiddle.net/3k6qrswf/1/
<table id="table" class="table">
<thead>
<tr>
<th data-field="BookTitle">Title</th>
</tr>
</thead>
</table>
var testData = [
{"BookTitle": "abc"},
{"BookTitle": "def"},
{"BookTitle": null}
];
$('#table').bootstrapTable({
data: testData
});谢谢
发布于 2016-07-21 19:49:27
你可以使用undefinedText选项来做你想做的事情,documentation here。
$('#table').bootstrapTable({
undefinedText: 'n/a',
data: testData
});https://stackoverflow.com/questions/38483029
复制相似问题