From 9f9774fd595850d7a2e8810e55d5fbfd027156e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Thu, 7 Mar 2024 09:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RouterSearch/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/RouterSearch/index.vue b/src/components/RouterSearch/index.vue index 91c08c5cc..1059e1529 100644 --- a/src/components/RouterSearch/index.vue +++ b/src/components/RouterSearch/index.vue @@ -117,17 +117,17 @@ const options = computed(() => { }) }) -function remoteMethod(data) { +const remoteMethod = (data) => { // 这里可以执行相应的操作(例如打开搜索框等) value.value = data } -function handleChange(path) { +const handleChange = (path) => { router.push({ path }) hiddenTopSearch(); } -function hiddenTopSearch() { +const hiddenTopSearch = () => { showTopSearch.value = false } @@ -142,7 +142,7 @@ onUnmounted(() => { }) // 监听 ctrl + k -function listenKey(event) { +const listenKey = (event) => { if ((event.ctrlKey || event.metaKey) && event.key === 'k') { showSearch.value = !showSearch.value // 这里可以执行相应的操作(例如打开搜索框等)