diff --git a/index.js b/index.js index 4f32cbc..3cc7fbb 100644 --- a/index.js +++ b/index.js @@ -103,6 +103,11 @@ module.exports = { // #endif page.$store.commit('i18n/setTabbar') // 必须要在有 tab 的页面里重置才能成功 }, + + localeText(){ + let page = this.$store ? this : getCurrentPages().pop() + return page.i18nText[page.$store.state.i18n.activeLang] + }, formatMoney(value, decimal){ return Number(value).toFixed(decimal||2)