handleCurrentChange (val) { this.loading = true rtumQueryUser({ body: { pageSize: 20, pageNum: val, userName: this.queryForm.userName } }) .then(res => { this.loading = false if (res.data.code === '20000') { this.userList = res.data.result.data this.totalPage = res.data.result.totalPage this.currentPage = res.data.result.pageNum this.pageSize = res.data.result.pageSize // this.expandRowKeys.push(this.userList[0].userId) } else { this.$message(res.data.message) } }) .catch(err => { this.loading = false this.$message.error(err.message) })}代码如上,想达到的效果是在 this.userList = res.data.result.data 使表格数据被渲染之后,再调用 this.expandRowKeys.push(this.userList[0].userId) 使表格的第一行展开,如果用Generator函数该怎么改写?也欢迎其他方法,多多益善,对这类问题不太会解决,谢谢!
添加回答
举报
0/150
提交
取消