From e788182c76bd71a69d74e438af6823014944e047 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Sun, 7 Jun 2020 19:07:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20localeText?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 5 +++++ 1 file changed, 5 insertions(+) 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)