From 625cc0f1763968b9fb71426b43a7878a6a66f4aa Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Thu, 26 Dec 2024 22:41:43 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20random=20keyword=20search=20f?= =?UTF-8?q?eature=20to=20homepage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.vue | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/pages/index.vue b/src/pages/index.vue index dccfd3088..38afcd522 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -347,9 +347,9 @@ > Math.random() - 0.5 + ); + const randomTerms = shuffled.slice(0, 3); + this.randomKeywords = randomTerms; + return randomTerms.join('、'); } + return this.$t('gutenberg_search_placeholder'); }, }, };