|
@@ -3,7 +3,11 @@ export default {
|
|
|
created() {
|
|
|
const { params, query } = this.$route
|
|
|
const { path } = params
|
|
|
- this.$router.replace({ path: '/' + path, query })
|
|
|
+ if (/\/redirect\/name\/.+/.test(this.$route.path)) {
|
|
|
+ this.$router.replace({ name: path, params: query })
|
|
|
+ } else {
|
|
|
+ this.$router.replace({ path: '/' + path, query })
|
|
|
+ }
|
|
|
},
|
|
|
render: function(h) {
|
|
|
return h() // avoid warning message
|