|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- this.$route.meta.title = this.$route.params.name
|
|
|
+ this.setPageTitle()
|
|
|
const savedTab = new URLSearchParams(window.location.search).get('tab')
|
|
|
if (!savedTab) {
|
|
|
this.activeIndex = 0
|
|
|
@@ -48,6 +48,13 @@ export default {
|
|
|
this.activeIndex = this.list.findIndex(e => e.path === savedTab)
|
|
|
},
|
|
|
methods: {
|
|
|
+ setPageTitle () {
|
|
|
+ const rawName = this.$route.params.name
|
|
|
+ const decodedName = rawName ? decodeURIComponent(rawName) : ''
|
|
|
+ const title = decodedName || '数据标签详情'
|
|
|
+ this.$route.meta.title = title
|
|
|
+ document.title = title
|
|
|
+ },
|
|
|
handleClick (item) {
|
|
|
this.$router.push(`${this.$route.path}?tab=${item.path}`)
|
|
|
}
|