<el-table @row-click="openDetails">
</el-table>
//对应的 methods 中
//点击行事件
methods: {
openDetails (row) {
this.$router.push("/home/index/" +row.userId);
},
}
el-table表格添加点击事件并带参跳转
最新推荐文章于 2024-05-28 19:39:02 发布
<el-table @row-click="openDetails">
</el-table>
//对应的 methods 中
//点击行事件
methods: {
openDetails (row) {
this.$router.push("/home/index/" +row.userId);
},
}