u
This commit is contained in:
parent
f9ffbb4989
commit
95c5416959
@ -64,7 +64,7 @@ module.exports = {
|
||||
i18nText =
|
||||
i18nText || // 如果传入i18n参数 ({zhCN:'...', enUS:'...'})
|
||||
this.i18nText || // 1) 如果挂载到具体页面的 computed { lote: wo?.localizeText } 那么 this 就是当前页面,直接取用 this.i18nText 即可。2) 对于组件内定义的 i18nText,要使用 this 来获得组件内的 i18nText
|
||||
getCurrentPages()?.pop()?.i18nText // 如果不是挂载到 Vue.prototype 而是 挂载到 wo 下调用,那么 this.i18nText 就不存在了。因此通过 pageNow.i18nText 访问。
|
||||
getCurrentPages?.()?.pop?.()?.i18nText // 如果不是挂载到 Vue.prototype 而是 挂载到 wo 下调用,那么 this.i18nText 就不存在了。因此通过 pageNow.i18nText 访问。
|
||||
if (['string', 'number', 'boolean'].includes(typeof i18nText)) {
|
||||
// 必须先检测是否标量值,如果直接返回 i18nText 可能返回{}等,导致依赖于返回空值的前端出错
|
||||
return i18nText
|
||||
|
||||
Loading…
Reference in New Issue
Block a user