跳转样式:
写法:
<el-button
type="text"
@click="
$router.push(
`tags?id=${scope.row.id}&name=${encodeURIComponent(
scope.row.subjectName
)}`
)
"
>学科标签</el-button
>
在跳转的页面中接收并使用
<el-button v-if="subject.id && subject.name">返回学科 //或者通过this.$route.query.id直接获取
</el-button>
computed: {
subject () {
return this.$route.query || {}
},
}