不用 getCurrent.Pages().pop() 而是用 index 来存取
This commit is contained in:
parent
dcdf12a15b
commit
d15c63c716
@ -242,7 +242,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setBarTitles({ windowTitle, pageTitle } = {}) {
|
setBarTitles({ windowTitle, pageTitle } = {}) {
|
||||||
let page = this.$store ? this : getCurrentPages().pop()
|
let page = this.$store ? this : getCurrentPages()[getCurrentPages().length - 1]
|
||||||
uni.setNavigationBarTitle({ title: pageTitle || page.i18nText[page.$store.state.i18n.mylang].tPageTitle })
|
uni.setNavigationBarTitle({ title: pageTitle || page.i18nText[page.$store.state.i18n.mylang].tPageTitle })
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
document.title = windowTitle || page.$store.getters['i18n/getAppName'] // 必须放在 setNavigationBarTitle 之后,否则会被其覆盖掉。
|
document.title = windowTitle || page.$store.getters['i18n/getAppName'] // 必须放在 setNavigationBarTitle 之后,否则会被其覆盖掉。
|
||||||
@ -251,7 +251,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
localeText() {
|
localeText() {
|
||||||
let page = this.$store ? this : getCurrentPages().pop()
|
let page = this.$store ? this : getCurrentPages()[getCurrentPages().length - 1]
|
||||||
return page.i18nText[page.$store.state.i18n.mylang]
|
return page.i18nText[page.$store.state.i18n.mylang]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user