lambo-design-bi 0.0.164 → 0.0.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -79,10 +79,25 @@ export default {
|
|
|
79
79
|
})
|
|
80
80
|
},
|
|
81
81
|
goBack() {
|
|
82
|
-
this.$
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
let routeConfig = this.$route || {}
|
|
83
|
+
console.log("child-page-tm goBack routeConfig:", routeConfig)
|
|
84
|
+
let parentRouteName = null
|
|
85
|
+
if (routeConfig && routeConfig.meta && routeConfig.meta.crumbs) {
|
|
86
|
+
let crumbs = routeConfig.meta.crumbs
|
|
87
|
+
if (crumbs && crumbs.length > 1) {
|
|
88
|
+
let parentRoute = crumbs[crumbs.length - 2]
|
|
89
|
+
if (parentRoute) {
|
|
90
|
+
parentRouteName = parentRoute.name || null
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (parentRouteName) {
|
|
95
|
+
console.log("child-page-tm goBack parentRouteName:", parentRouteName)
|
|
96
|
+
this.$router.push({ name: parentRouteName })
|
|
97
|
+
} else {
|
|
98
|
+
console.log("child-page-tm goBack history.back()")
|
|
99
|
+
this.$router.go(-1)
|
|
100
|
+
}
|
|
86
101
|
},
|
|
87
102
|
initSearch() {
|
|
88
103
|
let resObj = getInitSearchRes(this.childPageWidget)
|
|
@@ -140,5 +155,6 @@ export default {
|
|
|
140
155
|
}
|
|
141
156
|
}
|
|
142
157
|
}
|
|
158
|
+
|
|
143
159
|
</script>
|
|
144
160
|
<style scoped></style>
|