浏览代码

对话滚动优化

htc 1 周之前
父节点
当前提交
0d12d7c856
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      pages/dialog.vue

+ 5 - 3
pages/dialog.vue

@@ -225,9 +225,11 @@
 					share:false,
 				}
 				this.dialogList = [...this.dialogList,...[qa]];
-				uni.pageScrollTo({ scrollTop: 99999, duration: 300});
-				this.sendRequestWithRetry();
-				this.question = '';
+				this.$nextTick(()=>{
+					uni.pageScrollTo({ scrollTop: 99999, duration: 300});
+					this.sendRequestWithRetry();
+					this.question = '';
+				})
 			},
 			toCopy(item,index){
 				this.$set(this.dialogList[index],'copy',!this.dialogList[index].copy);