滚动到第一行:
this.$refs.table.bodyWrapper.scrollTop =0;
滚动到最后一行:
this.$refs.table.bodyWrapper.scrollTop =this.$refs.table.bodyWrapper.scrollHeight;
本文介绍了如何使用this.$refs.table.bodyWrapper.scrollTop属性将表格滚动到第一行或最后一行的方法。通过设置该属性为0可以滚动到第一行,设置为this.$refs.table.bodyWrapper.scrollHeight可以滚动到最后一行。
滚动到第一行:
this.$refs.table.bodyWrapper.scrollTop =0;
滚动到最后一行:
this.$refs.table.bodyWrapper.scrollTop =this.$refs.table.bodyWrapper.scrollHeight;
1436
1601

被折叠的 条评论
为什么被折叠?