mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
remove unused third party dependency
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import utils from "../lib/utils.js";
|
||||
|
||||
export default function (value, format) {
|
||||
if (utils.isNumber(value)) {
|
||||
return utils.formatUnixTime(value, format);
|
||||
} else {
|
||||
return utils.formatTime(value, format);
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,10 @@ function formatUnixTime(unixTime, format) {
|
||||
return moment.unix(unixTime).format(format);
|
||||
}
|
||||
|
||||
function formatTime(dateTime, format) {
|
||||
return moment(dateTime).format(format);
|
||||
}
|
||||
|
||||
function getUnixTime(date) {
|
||||
return moment(date).unix();
|
||||
}
|
||||
@@ -591,6 +595,7 @@ export default {
|
||||
getCurrentUnixTime,
|
||||
parseDateFromUnixTime,
|
||||
formatUnixTime,
|
||||
formatTime,
|
||||
getUnixTime,
|
||||
getYear,
|
||||
getMonth,
|
||||
|
||||
+2
-2
@@ -3,7 +3,6 @@ import Vuex from 'vuex';
|
||||
|
||||
import VueI18n from 'vue-i18n';
|
||||
import PincodeInput from 'vue-pincode-input';
|
||||
import VueMoment from 'vue-moment';
|
||||
import VueClipboard from 'vue-clipboard2';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
@@ -69,6 +68,7 @@ import { getAllLanguages, getLanguage, getDefaultLanguage, getI18nOptions, getLo
|
||||
import stores from './store/index.js';
|
||||
|
||||
import localizedFilter from './filters/localized.js';
|
||||
import momentFilter from './filters/moment.js';
|
||||
import percentFilter from './filters/percent.js';
|
||||
import itemFieldContentFilter from './filters/itemFieldContent.js';
|
||||
import currencyFilter from './filters/currency.js';
|
||||
@@ -131,7 +131,6 @@ Framework7.use(Framework7Vue);
|
||||
|
||||
Vue.use(Vuex);
|
||||
Vue.use(VueI18n);
|
||||
Vue.use(VueMoment, { moment });
|
||||
Vue.use(VueClipboard);
|
||||
|
||||
Vue.component('PincodeInput', PincodeInput);
|
||||
@@ -150,6 +149,7 @@ Vue.component('NumberPadSheet', NumberPadSheet);
|
||||
Vue.component('TransactionTagSelectionSheet', TransactionTagSelectionSheet);
|
||||
|
||||
Vue.filter('localized', (value, options) => localizedFilter({ i18n }, value, options));
|
||||
Vue.filter('moment', (value, format) => momentFilter(value, format));
|
||||
Vue.filter('percent', (value, precision, lowPrecisionValue) => percentFilter(value, precision, lowPrecisionValue));
|
||||
Vue.filter('itemFieldContent', (value, fieldName, defaultValue, translate) => itemFieldContentFilter({ i18n }, value, fieldName, defaultValue, translate));
|
||||
Vue.filter('currency', (value, currencyCode) => currencyFilter({ i18n }, value, currencyCode));
|
||||
|
||||
Reference in New Issue
Block a user