提交 53f03784 编写于 作者: D DebugIsFalse

fix: 第一次搜索问题bug

上级 6d7bac8c
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/> />
<UDivider v-if="data.length !== index + 1 || askingData.question" class="pt-3 pb-2" /> <UDivider v-if="data.length !== index + 1 || askingData.question" class="pt-3 pb-2" />
</template> </template>
<div class="grid" v-if="data.length > 0 && askingData.question"> <div class="grid" v-if="askingData.question">
<ISearchTitle as="h2" :title="askingData.question" :id="data.length + 1" /> <ISearchTitle as="h2" :title="askingData.question" :id="data.length + 1" />
</div> </div>
<ISearchContent <ISearchContent
...@@ -60,7 +60,7 @@ const state = reactive({ ...@@ -60,7 +60,7 @@ const state = reactive({
const historyStatus = ref(200) const historyStatus = ref(200)
const data = ref([]) const data = ref([])
const askingData = ref({ question: state.query, desLoading: true }) const askingData = ref({ question: $setFirstRecordTitle.value, desLoading: true })
const recommendQuestions = ref([]) const recommendQuestions = ref([])
const askingRef = ref(null) const askingRef = ref(null)
const historyAskRefs = ref([]) const historyAskRefs = ref([])
...@@ -161,9 +161,9 @@ const createGenerateInitItem = (question) => { ...@@ -161,9 +161,9 @@ const createGenerateInitItem = (question) => {
if (askingData.value.question) { if (askingData.value.question) {
data.value.push(askingData.value) data.value.push(askingData.value)
} }
askingData.value = { question, desLoading: true }
nextTick(() => { nextTick(() => {
handleCloseHistoryAsk() handleCloseHistoryAsk()
askingData.value = { question, desLoading: true }
}) })
} }
const handleContinueAsk = (question) => { const handleContinueAsk = (question) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册