相信很多同学一直在为这个头痛!
今天他来了,真的来了...
this.$nextTick(() => {// document.getElementById("scrolldIV2").scrollIntoView(); //h5端定位到指定位置 setTimeout(() => {uni.createSelectorQuery().select(".cu-chat").boundingClientRect(function(res) { //定位到你要的class的位置console.log("标签获取====>", res)uni.pageScrollTo({scrollTop: res.height,duration: 0});}).exec()}, 50)//this.viewIndex = "im_" + this.ChatList.length;})