第一种:
<template slot="btns" slot-scope="scope">
<el-button type="text" size="mini" @click="ck(scope.row)"> 查看</el-button>
</template>
ck(data){
this.$router.push({
path: `cont/look?xh=${data.xh}&id=${data.id}`
})
},
第二种:
<template slot="btns" slot-scope="scope">
<el-button type="text" size="mini" @click="ck(scope.row.xh,scope.row.id)"> 查看</el-button>
</template>
ck(xh,id){
this.$router.push({
path: `cont/look?xh=${xh}&id=${id}`,
});
},
传参之后在跳转页面接收:this.$route.query.xh/id