perf: 修改创建后的跳转

This commit is contained in:
ibuler 2022-03-17 12:11:41 +08:00 committed by Jiangjie.Bai
parent b6004c399c
commit 51d025b93a

View File

@ -153,12 +153,14 @@ export default {
msgLinkName = res.hostname msgLinkName = res.hostname
} }
const h = this.$createElement const h = this.$createElement
const detailRoute = this.objectDetailRoute
detailRoute.params = { id: res.id }
if (this.hasDetailInMsg) { if (this.hasDetailInMsg) {
this.$message({ this.$message({
message: h('p', null, [ message: h('p', null, [
h('el-link', { h('el-link', {
on: { on: {
click: () => this.$router.push(this.objectDetailRoute) click: () => this.$router.push(detailRoute)
}, },
style: { 'vertical-align': 'top' } style: { 'vertical-align': 'top' }
}, msgLinkName), }, msgLinkName),
@ -194,6 +196,7 @@ export default {
onPerformError: { onPerformError: {
type: Function, type: Function,
default(error, method, vm) { default(error, method, vm) {
this.$log.error('error: ', error)
this.$emit('submitError', error) this.$emit('submitError', error)
const response = error.response const response = error.response
const data = response.data const data = response.data