From d04c73aca356af8953293e9d50d1ae31b7097a4b Mon Sep 17 00:00:00 2001 From: KDZhu Date: Wed, 23 Oct 2024 15:56:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(access-log):=20=E6=9F=A5=E8=AF=A2=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5=E8=BE=93=E5=85=A5=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E5=86=99=E5=85=A5=E6=90=9C=E7=B4=A2=E5=8E=86?= =?UTF-8?q?=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../access-log/components/search-input.vue | 2 +- .../src/views/operate-data/access-log/index.vue | 9 ++++++--- src/dashboard-front/yarn.lock | 11 ++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/dashboard-front/src/views/operate-data/access-log/components/search-input.vue b/src/dashboard-front/src/views/operate-data/access-log/components/search-input.vue index 98fafa776..4fb32213e 100644 --- a/src/dashboard-front/src/views/operate-data/access-log/components/search-input.vue +++ b/src/dashboard-front/src/views/operate-data/access-log/components/search-input.vue @@ -70,7 +70,7 @@ - + { keyword.value = value; searchParams.value.query = keyword.value; pagination.value.current = 1; - // 写入搜索历史 - queryHistory.value.unshift(value); - queryHistory.value = uniq(queryHistory.value).slice(0, 10); + // 若是非空字符串则写入搜索历史 + if (trim(value) !== '') { + queryHistory.value.unshift(value); + queryHistory.value = uniq(queryHistory.value).slice(0, 10); + } getSearchData(); }; diff --git a/src/dashboard-front/yarn.lock b/src/dashboard-front/yarn.lock index 5f8f8f05a..7087d4b29 100644 --- a/src/dashboard-front/yarn.lock +++ b/src/dashboard-front/yarn.lock @@ -3043,9 +3043,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001578, caniuse-lite@^1.0.30001587: - version "1.0.30001651" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz" - integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== + version "1.0.30001669" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz" + integrity sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w== case-sensitive-paths-webpack-plugin@^2.4.0: version "2.4.0" @@ -3562,6 +3562,11 @@ cuint@^0.2.2: resolved "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz" integrity sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw== +cz-git@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/cz-git/-/cz-git-1.10.1.tgz#762a70488155f9ea4f2080508e99cb995ec7eaae" + integrity sha512-pBudDYUEqSOgt5cAlAk6BDs/h99lxfiii+1KCxfuVNOgcpn+yz7AejDjdBEJ+XDt7MOeAvcpYW3gi7C7il+IFA== + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz"