This commit is contained in:
陆柯 2022-04-01 23:29:06 +08:00
parent 6eceb821ee
commit 7c1151a987

View File

@ -18,7 +18,7 @@ export default {
RESPONSIVE_TABBAR_ALWAYSHIDE: false,
BACKEND: 'SERVER', // 通过变量来动态切换后台类型:服务器 SERVER 或云服务 UNICLOUD. 应当根据实际需要,在前端所用的 unitool 里覆盖。
this.thisPage() {
thisPage() {
return this.constructor.name==='VueComponent' ? this // 对于组件内定义的 i18nText要使用 this 来获得组建内的 i18nText而不是 getCurrentPages[...] 去访问全局页面的 i18nText。
: ( getCurrentPages()[getCurrentPages().length - 1] // [20220401] 发现在 topWindow 里, getCurrentPages 是 undefined。
|| {} ) // 用 {} 做备份是为了在 App.vue 中使用时getCurrentPages() 有可能获取不到。