提交 1ea71273 编写于 作者: D DebugIsFalse

fix: scroll问题

上级 8c48fffb
...@@ -74,9 +74,8 @@ function handleUpdateQuery(query) { ...@@ -74,9 +74,8 @@ function handleUpdateQuery(query) {
// 是否停止自动滚动到底部 // 是否停止自动滚动到底部
const isAutoToBottom = ref(true) const isAutoToBottom = ref(true)
watch(() => { watch(() => {
// console.log(`directions.top:`, directions.top)
if (directions.top) { if (directions.top) {
isAutoToBottom.value = true isAutoToBottom.value = false
} }
}) })
const scrollToView = () => { const scrollToView = () => {
...@@ -143,9 +142,9 @@ const handleFormFetchData = (fetchData) => { ...@@ -143,9 +142,9 @@ const handleFormFetchData = (fetchData) => {
if (Object.keys(message).length === 0) return if (Object.keys(message).length === 0) return
const { meta, choices } = message const { meta, choices } = message
const index = editIndex.value const index = editIndex.value
if (isAutoToBottom.value) { nextTick(() => {
scrollToView() scrollToView()
} })
// 处理报错信息 // 处理报错信息
if (!meta) { if (!meta) {
handleStopGenerate() handleStopGenerate()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册