提交 44289603 编写于 作者: Y yurj26

fix(mp-toutiao): 使用国际化报错的bug (question/161008)

上级 01fe3047
......@@ -159,7 +159,12 @@ export default function parseBaseApp (vm, {
delete this.$options.mpType
delete this.$options.mpInstance
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
(__PLATFORM__ === 'mp-toutiao' || __PLATFORM__ === 'mp-lark'
? this.mpType !== 'app'
: this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp()
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册