提交 412bdd43 编写于 作者: D DebugIsFalse

Update [id].vue

上级 dcbfebb8
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<h2 class="text-3xl" :id="data.length + 1">{{ askingData.question }}</h2> <h2 class="text-3xl" :id="data.length + 1">{{ askingData.question }}</h2>
</div> </div>
<ISearchContent <ISearchContent
v-show="askingData.question"
:item="askingData" :item="askingData"
:asking="asking" :asking="asking"
ref="askingRef" ref="askingRef"
...@@ -97,9 +98,7 @@ async function init () { ...@@ -97,9 +98,7 @@ async function init () {
} }
await init() await init()
useHead({
title: `${state.query} - GitBot`
})
function handleUpdateQuery(query) { function handleUpdateQuery(query) {
state.query = query state.query = query
} }
...@@ -168,7 +167,7 @@ const resetAutoBottom = () => { ...@@ -168,7 +167,7 @@ const resetAutoBottom = () => {
isAutoToBottom.value = true isAutoToBottom.value = true
}) })
} }
const handleFormatSource = (source) => { function handleFormatSource (source) {
const gitUrl = baseGitUrl() const gitUrl = baseGitUrl()
return source.split('\n').map((item) => { return source.split('\n').map((item) => {
const isLink = item.indexOf('http') === 0 const isLink = item.indexOf('http') === 0
...@@ -276,7 +275,9 @@ const generateFetchData = (query) => { ...@@ -276,7 +275,9 @@ const generateFetchData = (query) => {
// 重新生成相关问题 // 重新生成相关问题
fetchLinkedQuestion(query) fetchLinkedQuestion(query)
} }
useHead({
title: `${state.query} - GitBot`
})
onMounted( () => { onMounted( () => {
if (data.value.length === 0 && state.query) { if (data.value.length === 0 && state.query) {
generateFetchData(state.query) generateFetchData(state.query)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册