diff --git a/components/i/search/Header.vue b/components/i/search/Header.vue index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7dc1ed4625840199a6a1602019afe5af41e7bbcb 100644 --- a/components/i/search/Header.vue +++ b/components/i/search/Header.vue @@ -0,0 +1,54 @@ + + + + + + {{ editTitle }} + + + / + 收藏 + + + 收藏 + 分享 + + + + + + \ No newline at end of file diff --git a/pages/search/[id].vue b/pages/search/[id].vue index f45a47d05a28a662cef40d972c6495fe90dd0406..281af043418a772d25ba9f5a73f375bb9d8848f7 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -1,28 +1,6 @@ - - - - - {{ state.query }} - - - / - 收藏 - - - 收藏 - 分享 - - - - + {{ state.query }} @@ -76,7 +54,9 @@ const state = reactive({ useHead({ title: `${state.query} - GitBot` }) - +function handleUpdateQuery(query) { + state.query = query; +} // 是否停止自动滚动到底部 const isAutoToBottom = ref(true) const handleScroll = (event, params) => { @@ -96,22 +76,6 @@ const scrollToView = () => { const height = $target.clientHeight y.value = height } -const isEditTitle = ref(false) -const titleRef = ref(null) -const handleFocusTitle = () => { - isEditTitle.value = true -} -const handleBlurTitle = () => { - isEditTitle.value = false -} -function handleShare () { - useCopyToClipboard().copy(window.location.href) - toast.add({ - icon: 'i-heroicons-information-circle-20-solid', - timeout: 2000, - title: '链接已复制到剪贴板' - }) -} const handleReGenerate = (index) => { editIndex.value = index const question = data.value[editIndex.value].question