尝试了大概得有三天的滑动.. 最后发现竟然不是dom.scrollTo(..)....
而是.. window...
function scrollHeight() {
_this.$nextTick(() => {
let scrollElem = _this.$refs.container;
// console.log(scrollElem.scrollHeight,"scrollElem.scrollHeight")
// scrollElem.scrollTo({ top: scrollElem.scrollHeight, behavior: 'smooth' });
window.scrollTo({ top: scrollElem.scrollHeight, behavior: 'smooth' });
});
}
对,就是上边这个样子滴...