add currency filter

This commit is contained in:
MaysWind
2020-11-08 23:16:51 +08:00
parent da4083138c
commit 2dbaabdedd
6 changed files with 54 additions and 0 deletions
+3
View File
@@ -19,6 +19,7 @@ import settings from './lib/settings.js';
import services from './lib/services.js';
import userstate from './lib/userstate.js';
import utils from './lib/utils.js';
import currencyFilter from './filters/currency.js';
import App from './Mobile.vue';
Vue.use(VueI18n);
@@ -139,6 +140,8 @@ Vue.prototype.$hideLoading = function () {
Vue.prototype.$services = services;
Vue.prototype.$user = userstate;
Vue.filter('currency', (value, currencyCode) => currencyFilter({ i18n }, value, currencyCode));
Vue.prototype.$setLanguage(settings.getLanguage() || getDefaultLanguage());
// refresh token if user is logined