fix(home): 修复新建对话时的滚动和刷新问题
This commit is contained in:
parent
c7bf6bd6b1
commit
70cbde0d11
|
|
@ -492,7 +492,8 @@ export default {
|
||||||
|
|
||||||
scrollToBottom() {
|
scrollToBottom() {
|
||||||
// 如果正在加载更多,不执行滚动
|
// 如果正在加载更多,不执行滚动
|
||||||
if (this.isLoadingMore) return;
|
// 新建对话时不执行滚动
|
||||||
|
if (this.isLoadingMore || !this.currentConversationId) return;
|
||||||
|
|
||||||
// 使用nextTick确保DOM已更新
|
// 使用nextTick确保DOM已更新
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
@ -791,8 +792,8 @@ export default {
|
||||||
onScrollToUpper() {
|
onScrollToUpper() {
|
||||||
console.log("触发上拉刷新");
|
console.log("触发上拉刷新");
|
||||||
|
|
||||||
// 如果已经没有更多数据或正在切换对话,不再触发上拉刷新
|
// 如果已经没有更多数据或正在切换对话或当前对话为空(新建对话),不再触发上拉刷新
|
||||||
if (this.noMoreData || this.isSwitchingConversation) {
|
if (this.noMoreData || this.isSwitchingConversation || !this.currentConversationId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue