diff --git a/src/pages/index.vue b/src/pages/index.vue
index dccfd3088..120874174 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);
+ return randomTerms;
+ }
+ return [];
+ },
+ placeholderText() {
+ return this.randomKeywords?.length
+ ? this.randomKeywords.join('、')
+ : this.$t('gutenberg_search_placeholder');
+ },
},
mounted() {
logRetailEvent(this, 'home-page-view');
@@ -1096,6 +1113,14 @@ export default {
query: { q: this.searchQuery },
})
);
+ } else {
+ const fallbackKeyword = this.randomKeywords?.[0];
+ this.$router.push(
+ this.localeLocation({
+ name: 'store',
+ query: { q: fallbackKeyword },
+ })
+ );
}
},
},