From 833dd7d6142ceaff298cdb486e34b971df4a6068 Mon Sep 17 00:00:00 2001 From: Seedgou Date: Mon, 29 May 2023 21:19:27 +0800 Subject: [PATCH] fix Disable changing suggestions inside search box #13 --- .../search/composables/useRandomPlaceholder.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/search/composables/useRandomPlaceholder.ts b/src/components/search/composables/useRandomPlaceholder.ts index d5026c5..2609108 100644 --- a/src/components/search/composables/useRandomPlaceholder.ts +++ b/src/components/search/composables/useRandomPlaceholder.ts @@ -1,5 +1,5 @@ import { ref } from "vue"; -import { useIntervalFn } from "@vueuse/core"; +// import { useIntervalFn } from "@vueuse/core"; const placeholders = [ "cat", @@ -40,12 +40,12 @@ export function useRandomPlaceholder() { placeholders[Math.floor(Math.random() * placeholders.length)] ); - const updatePlaceholder = () => { - const index = Math.floor(Math.random() * placeholders.length); - placeholder.value = placeholders[index]; - }; + // const updatePlaceholder = () => { + // const index = Math.floor(Math.random() * placeholders.length); + // placeholder.value = placeholders[index]; + // }; - useIntervalFn(updatePlaceholder, 1500); + // useIntervalFn(updatePlaceholder, 1500); return { placeholder }; }