父页面代码,传值操作:
goToDetail(row) {
this.$router.push({
path: "assetdetail",
query: { alias: row.name, id: row.id }
})
}
子页面代码,取值操作:
// 取query对象值
this.$route.query
// 取query具体属性值
this.$route.query.alias
this.$route.query.id
父页面代码,传值操作:
goToDetail(row) {
this.$router.push({
path: "assetdetail",
query: { alias: row.name, id: row.id }
})
}
子页面代码,取值操作:
// 取query对象值
this.$route.query
// 取query具体属性值
this.$route.query.alias
this.$route.query.id