|
|
@@ -168,16 +168,27 @@ export default {
|
|
168
|
168
|
this.$i18n.locale = next
|
|
169
|
169
|
this.layoutKey += 1
|
|
170
|
170
|
this.$nextTick(() => {
|
|
171
|
|
- if (!isTabBarPage()) {
|
|
|
171
|
+ const applyLangUi = () => {
|
|
|
172
|
+ if (!isTabBarPage()) {
|
|
|
173
|
+ return
|
|
|
174
|
+ }
|
|
|
175
|
+ syncTabBarText((k) => this.$t(k))
|
|
|
176
|
+ const p = uni.setNavigationBarTitle({
|
|
|
177
|
+ title: this.$t(this.navTitleKey)
|
|
|
178
|
+ })
|
|
|
179
|
+ if (p && typeof p.catch === 'function') {
|
|
|
180
|
+ p.catch(() => {})
|
|
|
181
|
+ }
|
|
|
182
|
+ }
|
|
|
183
|
+ if (isTabBarPage()) {
|
|
|
184
|
+ applyLangUi()
|
|
172
|
185
|
return
|
|
173
|
186
|
}
|
|
174
|
|
- syncTabBarText((k) => this.$t(k))
|
|
175
|
|
- const p = uni.setNavigationBarTitle({
|
|
176
|
|
- title: this.$t(this.navTitleKey)
|
|
|
187
|
+ ensureTabBarEntry().then((ok) => {
|
|
|
188
|
+ if (ok) {
|
|
|
189
|
+ applyLangUi()
|
|
|
190
|
+ }
|
|
177
|
191
|
})
|
|
178
|
|
- if (p && typeof p.catch === 'function') {
|
|
179
|
|
- p.catch(() => {})
|
|
180
|
|
- }
|
|
181
|
192
|
})
|
|
182
|
193
|
}
|
|
183
|
194
|
}
|