diff --git a/index.js b/index.js index b4f328d..f5ace07 100644 --- a/index.js +++ b/index.js @@ -95,6 +95,14 @@ module.exports = { } }, + setBarTitles({windowTitle, pageTitle}={}){ + uni.setNavigationBarTitle({ title: pageTitle || this.localeText.tPageTitle }) + // #ifdef H5 + document.title = windowTitle || this.appName || this.$store.getters['i18n/getAppName'] // 必须放在 setNavigationBarTitle 之后,否则会被其覆盖掉。 + // #endif + this.$store.commit('i18n/setTabbar') // 必须要在有 tab 的页面里重置才能成功 + }, + formatMoney(value, decimal){ return Number(value).toFixed(decimal||2) },