feat: add placeholder to result table

This commit is contained in:
Emil Zhai 2022-12-06 07:10:28 +00:00
parent de75cbb7ac
commit a4bbd3bd27
No known key found for this signature in database
GPG Key ID: 780B385DB72F1EBD
2 changed files with 10 additions and 0 deletions

View File

@ -117,6 +117,13 @@ select.typecho-access-logs-filter-item__content {
margin-left: 10px;
}
.typecho-access-logs-table-placeholder {
font-size: 18px;
color: #cccccc;
font-weight: normal;
letter-spacing: 3px;
}
.typecho-access-logs-pagination-jump {
float: right;
display: flex;

View File

@ -131,6 +131,9 @@ $(document).ready(function () {
// append row to table body
$tbody.append($tr);
});
if ($tbody.html() === '') {
$tbody.html('<tr><td colspan="7"><h6 class="typecho-list-table-title typecho-access-logs-table-placeholder">暂无数据</h6></td></tr>');
}
$('a[data-action="search-anchor"]').click(onSearchAnchorClick);
// logs pagination