解除 setBarTitles() 对 page.localeText 的依赖
This commit is contained in:
parent
e788182c76
commit
7ca31adffa
4
index.js
4
index.js
@ -97,9 +97,9 @@ module.exports = {
|
||||
|
||||
setBarTitles({windowTitle, pageTitle}={}){
|
||||
let page = this.$store ? this : getCurrentPages().pop()
|
||||
uni.setNavigationBarTitle({ title: pageTitle || page.localeText.tPageTitle || page.i18nText[page.$store.state.i18n.activeLang].tPageTitle })
|
||||
uni.setNavigationBarTitle({ title: pageTitle || page.i18nText[page.$store.state.i18n.activeLang].tPageTitle })
|
||||
// #ifdef H5
|
||||
document.title = windowTitle || page.appName || page.$store.getters['i18n/getAppName'] // 必须放在 setNavigationBarTitle 之后,否则会被其覆盖掉。
|
||||
document.title = windowTitle || page.$store.getters['i18n/getAppName'] || page.appName // 必须放在 setNavigationBarTitle 之后,否则会被其覆盖掉。
|
||||
// #endif
|
||||
page.$store.commit('i18n/setTabbar') // 必须要在有 tab 的页面里重置才能成功
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user