mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-22 02:34:26 +08:00
remove unused third party dependency
This commit is contained in:
Generated
-8
@@ -12699,14 +12699,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-moment": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/vue-moment/-/vue-moment-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-Gzisqpg82ItlrUyiD9d0Kfru+JorW2o4mQOH06lEDZNgxci0tv/fua1Hl0bo4DozDV2JK1r52Atn/8QVCu8qQw==",
|
|
||||||
"requires": {
|
|
||||||
"moment": "^2.19.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vue-pincode-input": {
|
"vue-pincode-input": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/vue-pincode-input/-/vue-pincode-input-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/vue-pincode-input/-/vue-pincode-input-0.4.0.tgz",
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
"vue": "^2.6.12",
|
"vue": "^2.6.12",
|
||||||
"vue-clipboard2": "^0.3.1",
|
"vue-clipboard2": "^0.3.1",
|
||||||
"vue-i18n": "^8.23.0",
|
"vue-i18n": "^8.23.0",
|
||||||
"vue-moment": "^4.1.0",
|
|
||||||
"vue-pincode-input": "^0.4.0",
|
"vue-pincode-input": "^0.4.0",
|
||||||
"vuex": "^3.6.2"
|
"vuex": "^3.6.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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);
|
return moment.unix(unixTime).format(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatTime(dateTime, format) {
|
||||||
|
return moment(dateTime).format(format);
|
||||||
|
}
|
||||||
|
|
||||||
function getUnixTime(date) {
|
function getUnixTime(date) {
|
||||||
return moment(date).unix();
|
return moment(date).unix();
|
||||||
}
|
}
|
||||||
@@ -591,6 +595,7 @@ export default {
|
|||||||
getCurrentUnixTime,
|
getCurrentUnixTime,
|
||||||
parseDateFromUnixTime,
|
parseDateFromUnixTime,
|
||||||
formatUnixTime,
|
formatUnixTime,
|
||||||
|
formatTime,
|
||||||
getUnixTime,
|
getUnixTime,
|
||||||
getYear,
|
getYear,
|
||||||
getMonth,
|
getMonth,
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,6 @@ import Vuex from 'vuex';
|
|||||||
|
|
||||||
import VueI18n from 'vue-i18n';
|
import VueI18n from 'vue-i18n';
|
||||||
import PincodeInput from 'vue-pincode-input';
|
import PincodeInput from 'vue-pincode-input';
|
||||||
import VueMoment from 'vue-moment';
|
|
||||||
import VueClipboard from 'vue-clipboard2';
|
import VueClipboard from 'vue-clipboard2';
|
||||||
|
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
@@ -69,6 +68,7 @@ import { getAllLanguages, getLanguage, getDefaultLanguage, getI18nOptions, getLo
|
|||||||
import stores from './store/index.js';
|
import stores from './store/index.js';
|
||||||
|
|
||||||
import localizedFilter from './filters/localized.js';
|
import localizedFilter from './filters/localized.js';
|
||||||
|
import momentFilter from './filters/moment.js';
|
||||||
import percentFilter from './filters/percent.js';
|
import percentFilter from './filters/percent.js';
|
||||||
import itemFieldContentFilter from './filters/itemFieldContent.js';
|
import itemFieldContentFilter from './filters/itemFieldContent.js';
|
||||||
import currencyFilter from './filters/currency.js';
|
import currencyFilter from './filters/currency.js';
|
||||||
@@ -131,7 +131,6 @@ Framework7.use(Framework7Vue);
|
|||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
Vue.use(VueI18n);
|
Vue.use(VueI18n);
|
||||||
Vue.use(VueMoment, { moment });
|
|
||||||
Vue.use(VueClipboard);
|
Vue.use(VueClipboard);
|
||||||
|
|
||||||
Vue.component('PincodeInput', PincodeInput);
|
Vue.component('PincodeInput', PincodeInput);
|
||||||
@@ -150,6 +149,7 @@ Vue.component('NumberPadSheet', NumberPadSheet);
|
|||||||
Vue.component('TransactionTagSelectionSheet', TransactionTagSelectionSheet);
|
Vue.component('TransactionTagSelectionSheet', TransactionTagSelectionSheet);
|
||||||
|
|
||||||
Vue.filter('localized', (value, options) => localizedFilter({ i18n }, value, options));
|
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('percent', (value, precision, lowPrecisionValue) => percentFilter(value, precision, lowPrecisionValue));
|
||||||
Vue.filter('itemFieldContent', (value, fieldName, defaultValue, translate) => itemFieldContentFilter({ i18n }, value, fieldName, defaultValue, translate));
|
Vue.filter('itemFieldContent', (value, fieldName, defaultValue, translate) => itemFieldContentFilter({ i18n }, value, fieldName, defaultValue, translate));
|
||||||
Vue.filter('currency', (value, currencyCode) => currencyFilter({ i18n }, value, currencyCode));
|
Vue.filter('currency', (value, currencyCode) => currencyFilter({ i18n }, value, currencyCode));
|
||||||
|
|||||||
@@ -99,12 +99,6 @@
|
|||||||
"url": "https://github.com/kazupon/vue-i18n",
|
"url": "https://github.com/kazupon/vue-i18n",
|
||||||
"licenseUrl": "https://github.com/kazupon/vue-i18n/blob/v8.x/LICENSE"
|
"licenseUrl": "https://github.com/kazupon/vue-i18n/blob/v8.x/LICENSE"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vue-moment",
|
|
||||||
"copyright": "Copyright (c) 2017 Brock Petrie",
|
|
||||||
"url": "https://github.com/brockpetrie/vue-moment",
|
|
||||||
"licenseUrl": "https://github.com/brockpetrie/vue-moment/blob/master/LICENSE"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vue-clipboard2",
|
"name": "vue-clipboard2",
|
||||||
"copyright": "Copyright (c) 2017 Inndy <inndy \\dot tw \\at gmail \\dot com>",
|
"copyright": "Copyright (c) 2017 Inndy <inndy \\dot tw \\at gmail \\dot com>",
|
||||||
|
|||||||
Reference in New Issue
Block a user