el-table切换页码后,返回数据顶部

110 阅读1分钟

el-table切换页码后,返回数据顶部

// html

<el-table ref='table'></el-table>


//在执行完跳转页码的数据请求后
this.$nextTick(() => {
  this.$refs.table.bodyWrapper.scrollTop = 0
})