From cd352dd1680b54a4465de328eeecfc9112078ad1 Mon Sep 17 00:00:00 2001 From: DebugIsFalse <511418503@qq.com> Date: Wed, 22 May 2024 16:11:49 +0800 Subject: [PATCH] feature: Content.vue --- components/i/search/Content.vue | 115 ++++++++++++++++++++++++++++++++ pages/search/[id].vue | 91 +++---------------------- 2 files changed, 125 insertions(+), 81 deletions(-) diff --git a/components/i/search/Content.vue b/components/i/search/Content.vue index e69de29..0c0097f 100644 --- a/components/i/search/Content.vue +++ b/components/i/search/Content.vue @@ -0,0 +1,115 @@ + + \ No newline at end of file diff --git a/pages/search/[id].vue b/pages/search/[id].vue index b8d544c..6f41e79 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -35,73 +35,14 @@

{{ item.question }}

- - - - - - - -
- - {{ item.ansLoading ? '回答中' : '回答' }} -
- -
- - - -
- + { // 在asking操作的时候生效 if (!asking.value || !isAutoToBottom.value) return @@ -146,8 +86,6 @@ const handleScroll = (event, params) => { const top = window.scrollY; if (top < y.value) { isAutoToBottom.value = false - } else { - markedWindowScrollTop = top } }) } @@ -166,23 +104,14 @@ const handleFocusTitle = () => { const handleBlurTitle = () => { isEditTitle.value = false } -const handleShare = (hash) => { - useCopyToClipboard().copy(window.location.href + (hash ? '#' + hash : '')) +function handleShare () { + useCopyToClipboard().copy(window.location.href) toast.add({ icon: 'i-heroicons-information-circle-20-solid', timeout: 2000, title: '链接已复制到剪贴板' }) } -const handleCopyMD = (index) => { - const article = data.value[index].article - useCopyToClipboard().copy(article) - toast.add({ - icon: 'i-heroicons-information-circle-20-solid', - timeout: 1000, - title: '复制成功' - }) -} const handleReGenerate = (index) => { editIndex.value = index const question = data.value[editIndex.value].question -- GitLab