1、elementUI
scrollToTop() => {
this.$nextTick(() => {
this.$refs.refTable.$refs['table-box'].bodyWrapper.scrollTop = 0;
});
}
2、element-plus
const scrollToTop = () => {
if (tableRef.value) {
const firstRow = tableRef.value.$el.querySelector('.el-table__body tr:first-child');
firstRow.scrollIntoView({ block: 'start', inline: 'nearest' });
}
};
已实践。
1万+

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



