bug: fix the problem that custom page title not effect;

修复:自定义页面标题不起作用的问题;
master
chenghongxing 4 years ago
parent 533890a376
commit a4b0785f0f
  1. 4
      src/layouts/PageLayout.vue
  2. 2
      src/layouts/tabs/TabsHead.vue
  3. 1
      src/layouts/tabs/TabsView.vue

@ -95,6 +95,10 @@ export default {
const path = route.path.length === 0 ? '/home' : route.path
breadcrumb.push(this.$t(getI18nKey(path)))
})
let pageTitle = this.page && this.page.title
if (pageTitle) {
breadcrumb[breadcrumb.length - 1] = pageTitle
}
return breadcrumb
},
/**

@ -95,7 +95,7 @@
this.$emit('contextmenu', pageKey, e)
},
pageName(page) {
return this.$t(getI18nKey(page.keyPath))
return page.title || this.$t(getI18nKey(page.keyPath))
}
}
}

@ -249,6 +249,7 @@ export default {
return {
keyPath: route.matched[route.matched.length - 1].path,
fullPath: route.fullPath, loading: false,
title: route.meta && route.meta.page && route.meta.page.title,
unclose: route.meta && route.meta.page && (route.meta.page.closable === false),
}
},

Loading…
Cancel
Save