From d3b4539713e1eaae417ec1eb8b4693b3be07b403 Mon Sep 17 00:00:00 2001 From: Aresn Date: Mon, 3 Jun 2024 16:31:00 +0800 Subject: [PATCH] shou'ye --- components/i/Create.vue | 7 ++++++ components/i/Logo.vue | 2 +- components/i/SearchHistory.vue | 2 +- pages/index.vue | 39 +++++++++++++++++++++++++++++++++- 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/components/i/Create.vue b/components/i/Create.vue index 0594657..36e1726 100644 --- a/components/i/Create.vue +++ b/components/i/Create.vue @@ -111,6 +111,13 @@ const handleSearch = async () => { navigateTo(`/search/${data.value.data.c_id}`) emits('search') } +function handleQuickSearch (title) { + query.value = title + handleSearch() +} +defineExpose({ + handleQuickSearch +}) function handleClearRepo () { selectedRepo.value = '' } diff --git a/components/i/Logo.vue b/components/i/Logo.vue index 4527136..c9e0f1c 100644 --- a/components/i/Logo.vue +++ b/components/i/Logo.vue @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/components/i/SearchHistory.vue b/components/i/SearchHistory.vue index a09594d..982b1cb 100644 --- a/components/i/SearchHistory.vue +++ b/components/i/SearchHistory.vue @@ -29,7 +29,7 @@ :to="`/search/${item.c_id}`" @click="handleClickItem" > -
{{ item.title }}
+
{{ item.title }}
diff --git a/pages/index.vue b/pages/index.vue index 40ccc2e..c703ba6 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -2,6 +2,43 @@
开源搜索,直达结果
- + +
+ +
+ \ No newline at end of file -- GitLab