@@ -60,10 +60,10 @@ export default {
|
||||
this.updatePageHeight(0)
|
||||
},
|
||||
computed: {
|
||||
...mapState('setting', ['layout', 'multiPage', 'pageMinHeight', 'pageWidth']),
|
||||
...mapState('setting', ['layout', 'multiPage', 'pageMinHeight', 'pageWidth', 'customTitles']),
|
||||
pageTitle() {
|
||||
let pageTitle = this.page && this.page.title
|
||||
return pageTitle === undefined ? (this.title || this.routeName) : this.$t(pageTitle)
|
||||
return this.customTitle || (pageTitle && this.$t(pageTitle)) || this.title || this.routeName
|
||||
},
|
||||
routeName() {
|
||||
const route = this.$route
|
||||
@@ -96,8 +96,8 @@ export default {
|
||||
breadcrumb.push(this.$t(getI18nKey(path)))
|
||||
})
|
||||
let pageTitle = this.page && this.page.title
|
||||
if (pageTitle) {
|
||||
breadcrumb[breadcrumb.length - 1] = pageTitle
|
||||
if (this.customTitle || pageTitle) {
|
||||
breadcrumb[breadcrumb.length - 1] = this.customTitle || pageTitle
|
||||
}
|
||||
return breadcrumb
|
||||
},
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
this.affixed = this.fixedTabs
|
||||
},
|
||||
computed: {
|
||||
...mapState('setting', ['layout', 'pageWidth', 'fixedHeader', 'fixedTabs']),
|
||||
...mapState('setting', ['layout', 'pageWidth', 'fixedHeader', 'fixedTabs', 'customTitles']),
|
||||
lockTitle() {
|
||||
return this.$t(this.fixedTabs ? 'unlock' : 'lock')
|
||||
}
|
||||
@@ -95,7 +95,8 @@
|
||||
this.$emit('contextmenu', pageKey, e)
|
||||
},
|
||||
pageName(page) {
|
||||
return page.title || this.$t(getI18nKey(page.keyPath))
|
||||
const custom = this.customTitles.find(item => item.path === page.fullPath)
|
||||
return (custom && custom.title) || page.title || this.$t(getI18nKey(page.keyPath))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user