From a4bbd3bd27ea1484e3f4d9fa83213419b6cf4df7 Mon Sep 17 00:00:00 2001 From: Emil Zhai Date: Tue, 6 Dec 2022 07:10:28 +0000 Subject: [PATCH] feat: add placeholder to result table --- page/routes/logs/index.css | 7 +++++++ page/routes/logs/index.js | 3 +++ 2 files changed, 10 insertions(+) diff --git a/page/routes/logs/index.css b/page/routes/logs/index.css index 172eedb..a2e7372 100644 --- a/page/routes/logs/index.css +++ b/page/routes/logs/index.css @@ -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; diff --git a/page/routes/logs/index.js b/page/routes/logs/index.js index 7e13d15..4e1a812 100644 --- a/page/routes/logs/index.js +++ b/page/routes/logs/index.js @@ -131,6 +131,9 @@ $(document).ready(function () { // append row to table body $tbody.append($tr); }); + if ($tbody.html() === '') { + $tbody.html('
暂无数据
'); + } $('a[data-action="search-anchor"]').click(onSearchAnchorClick); // logs pagination