处理代码合并后的问题

This commit is contained in:
wangyifeng 2025-05-29 18:28:12 +08:00
parent a86cdbf94a
commit e27682badf
2 changed files with 8 additions and 4 deletions

View File

@ -142,6 +142,11 @@ export const useTalkRecord = (uid: number) => {
if (el) { if (el) {
if (request.cursor == 0) { if (request.cursor == 0) {
// el.scrollTop = el.scrollHeight
// setTimeout(() => {
// el.scrollTop = el.scrollHeight + 1000
// }, 500)
scrollToBottom() scrollToBottom()
} else { } else {
el.scrollTop = el.scrollHeight - scrollHeight el.scrollTop = el.scrollHeight - scrollHeight
@ -254,11 +259,10 @@ export const useTalkRecord = (uid: number) => {
el.scrollTo({ top: scrollTo, behavior: 'smooth' }) el.scrollTo({ top: scrollTo, behavior: 'smooth' })
addClass(target, 'border') addClass(target, 'border')
setTimeout(() => removeClass(target, 'border'), 3000) setTimeout(() => removeClass(target, 'border'), 3000)
} else if (el) {
scrollToBottom()
} }
} else if (el) { } else if (el) {
el.scrollTop = el.scrollHeight // el.scrollTop = el.scrollHeight
scrollToBottom()
} }
}) })
}) })

View File

@ -16,7 +16,7 @@ import Editor from '@/components/editor/Editor.vue'
import MultiSelectFooter from './MultiSelectFooter.vue' import MultiSelectFooter from './MultiSelectFooter.vue'
import HistoryRecord from '@/components/talk/HistoryRecord.vue' import HistoryRecord from '@/components/talk/HistoryRecord.vue'
import {scrollToBottom} from '@/utils/dom.ts' import {scrollToBottom} from '@/utils/dom.ts'
import SimpleEditorExample from '@/components/editor/SimpleEditorExample.vue' // import SimpleEditorExample from '@/components/editor/SimpleEditorExample.vue'
const userStore = useUserStore() const userStore = useUserStore()
const talkStore = useTalkStore() const talkStore = useTalkStore()
const editorStore = useEditorStore() const editorStore = useEditorStore()