+
+
+ 理解问题
-
-
-
+
+
+
+
+
+
-
- 理解问题
+
+ 搜索项目
-
+
-
-
-
-
- 搜索项目
-
-
-
-
-
- 找到 {{ sourceCount }} 条来源
-
-
-
- 整理答案
-
+ 找到 {{ sourceCount }} 条来源
+
+
+
+ 整理答案
-
-
+
+
-
{{ item.ansLoading ? '回答中' : '回答' }}
@@ -92,6 +88,20 @@ const props = defineProps({
}
})
const emits = defineEmits(['regenerate'])
+const openCollapse = ref(true)
+function handleToggleCollapse () {
+ openCollapse.value = !openCollapse.value
+}
+watch(
+ () => props.item.ansLoading,
+ (value, oldValue) => {
+ if (oldValue === undefined) {
+ setTimeout(() => {
+ openCollapse.value = false
+ }, 500)
+ }
+ }
+)
function handleReGenerate () {
emits('regenerate', props.index)
}
diff --git a/pages/search/[id].vue b/pages/search/[id].vue
index f45a47d05a28a662cef40d972c6495fe90dd0406..ec656e6641bcfe02f9cc62c6931f2a914a639bca 100644
--- a/pages/search/[id].vue
+++ b/pages/search/[id].vue
@@ -143,9 +143,6 @@ const sourceCount = computed(() => {
return currentData.source.length
})
let asking = ref(false)
-const handleClearInput = () => {
- continueQuestion.value = ''
-}
const handleContinueAsk = (question) => {
if (asking.value) return
isAutoToBottom.value = true
@@ -153,7 +150,6 @@ const handleContinueAsk = (question) => {
editIndex.value = data.value.length
createGenerateInitItem(question)
generateFetchData(question)
- handleClearInput()
scrollToView()
}