提交 a146324b 编写于 作者: View Design's avatar View Design

Merge branch 'main' of gitcode.com:git_bot/ai-fe

...@@ -2,15 +2,13 @@ ...@@ -2,15 +2,13 @@
<div class="w-full items-center flex flex-col"> <div class="w-full items-center flex flex-col">
<iSearchHeader :query="state.query" @update-query="handleUpdateQuery" /> <iSearchHeader :query="state.query" @update-query="handleUpdateQuery" />
<div class="container min-h-svh max-w-screen-lg flex flex-col space-y-6 p-6 mb-6 pb-0" id="scrollElement"> <div class="container min-h-svh max-w-screen-lg flex flex-col space-y-6 p-6 mb-6 pb-0" id="scrollElement">
<template v-if="askingData.question"> <div class="grid">
<div class="grid"> <h1 class="text-3xl">{{ state.query }}</h1>
<h1 class="text-3xl">{{ state.query }}</h1> </div>
</div> <section class="flex items-center gap-2">
<section class="flex items-center gap-2"> <UIcon name="i-simple-icons-github" />
<UIcon name="i-simple-icons-github" /> {{ state.repo }}
{{ state.repo }} </section>
</section>
</template>
<template v-for="(item, index) in data" :key="index"> <template v-for="(item, index) in data" :key="index">
<div class="grid" v-if="index !== 0"> <div class="grid" v-if="index !== 0">
<h2 class="text-3xl" :id="index + 1">{{ item.question }}</h2> <h2 class="text-3xl" :id="index + 1">{{ item.question }}</h2>
...@@ -28,7 +26,6 @@ ...@@ -28,7 +26,6 @@
<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-if="askingData.question"
:item="askingData" :item="askingData"
:asking="asking" :asking="asking"
ref="askingRef" ref="askingRef"
...@@ -276,12 +273,9 @@ async function init () { ...@@ -276,12 +273,9 @@ async function init () {
initSearchRecords(records) initSearchRecords(records)
} }
await init() await init()
nextTick( () => { onMounted( () => {
if (data.value.length === 0 && state.query) { if (data.value.length === 0 && state.query) {
generateFetchData(state.query) generateFetchData(state.query)
} else {
asking.value = false
askingData.value = {}
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册