Skip to content

Commit

Permalink
修改bootstrap-table生成的详情+号td标签样式 (#2604)
Browse files Browse the repository at this point in the history
Co-authored-by: 王飞 <[email protected]>
  • Loading branch information
feiazifeiazi and 王飞 committed May 7, 2024
1 parent f253d0a commit 3bd21e7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sql/templates/sqlquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,8 @@ <h4 class="modal-title text-danger">收藏语句</h4>
isdetail = true
}
var showExport = {{can_download}}===1
$(`#query_result${n}`).bootstrapTable('destroy').bootstrapTable({
var query_result_id=(`query_result${n}`);
$(`#${query_result_id}`).bootstrapTable('destroy').bootstrapTable({
escape: true,
data: result['rows'],
columns: columns,
Expand Down Expand Up @@ -870,6 +871,15 @@ <h4 class="modal-title text-danger">收藏语句</h4>
});
return html.join('');
},
onPostBody: function(data) {
//此处的属性及样式名称来自于bootstrap-table.js
//有detail的表头添加sytle
var thHasDetail=$(`#${query_result_id} th.detail`);
thHasDetail.css('white-space', 'nowrap');
//有详情+号的的td,添加sytle
var tdHasDetail=$(`#${query_resultId} tr[data-has-detail-view="true"] .detail-icon`).parent('td');
tdHasDetail.css('white-space', 'nowrap');
},
locale: 'zh-CN',
onExportSaved: function (e) {
var tabs = $("#nav-tabs li")
Expand Down

0 comments on commit 3bd21e7

Please sign in to comment.