|
|
@ -17,7 +17,8 @@ const TabsPagePlugin = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
$setPageTitle(route, title) { |
|
|
|
$setPageTitle(route, title) { |
|
|
|
if (title) { |
|
|
|
if (title) { |
|
|
|
const path = typeof route === 'object' ? route.path : route |
|
|
|
let path = typeof route === 'object' ? route.path : route |
|
|
|
|
|
|
|
path = path && path.split('?')[0] |
|
|
|
this.$store.commit('setting/setCustomTitle', {path, title}) |
|
|
|
this.$store.commit('setting/setCustomTitle', {path, title}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -25,7 +26,7 @@ const TabsPagePlugin = { |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
customTitle() { |
|
|
|
customTitle() { |
|
|
|
const customTitles = this.$store.state.setting.customTitles |
|
|
|
const customTitles = this.$store.state.setting.customTitles |
|
|
|
const path = this.$route.path |
|
|
|
const path = this.$route.path.split('?')[0] |
|
|
|
const custom = customTitles.find(item => item.path === path) |
|
|
|
const custom = customTitles.find(item => item.path === path) |
|
|
|
return custom && custom.title |
|
|
|
return custom && custom.title |
|
|
|
} |
|
|
|
} |
|
|
|