1.設置table的ref為tableList2.設置滾動至頂部this.$refs.tableList.bodyWrapper.scrollTop =0;3.設置滾動至底部this.$refs.tableList.bodyWrapper.scrollTop =this.$refs.tableList.bodyWrapper.scrollHeight;//如果請求完更新數據,需要使用$nextTick
this.$nextTick(() => {this.$refs.tableList.bodyWrapper.scrollTop=this.$refs.tableList.bodyWrapper.scrollHeight;
})
?