ui: 还原momentjs

This commit is contained in:
undefined committed 2021-06-11 16:51:48 +08:00
1 parent 83a45940aa
commit e6c1592875
2 files changed
+4 -3

No files matched your search

@@ -1,5 +1,5 @@
import _ from 'lodash'; import _ from 'lodash';
import moment from 'dayjs'; import moment from 'moment';
import tpl from 'vj/utils/tpl'; import tpl from 'vj/utils/tpl';
export default class Calendar { export default class Calendar {
@@ -165,7 +165,6 @@ export default class Calendar {
} }
buildBodyData() { buildBodyData() {
const now = moment();
const days = []; const days = [];
{ {
// back fill // back fill
@@ -206,6 +205,7 @@ export default class Calendar {
} }
} }
const now = moment();
days.forEach((day) => { days.forEach((day) => {
day.current = day.date.isSame(now, 'day'); // eslint-disable-line no-param-reassign day.current = day.date.isSame(now, 'day'); // eslint-disable-line no-param-reassign
}); });
+2 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@hydrooj/ui-default", "name": "@hydrooj/ui-default",
"version": "4.11.14", "version": "4.11.15",
"author": "undefined <i@undefined.moe>", "author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "hydro.js", "main": "hydro.js",
@@ -66,6 +66,7 @@
"jquery.easing": "^1.4.1", "jquery.easing": "^1.4.1",
"jquery.transit": "^0.9.12", "jquery.transit": "^0.9.12",
"mini-css-extract-plugin": "^1.6.0", "mini-css-extract-plugin": "^1.6.0",
"moment": "^2.29.1",
"monaco-editor": "^0.24.0", "monaco-editor": "^0.24.0",
"monaco-editor-webpack-plugin": "^3.1.0", "monaco-editor-webpack-plugin": "^3.1.0",
"nanoid": "^3.1.23", "nanoid": "^3.1.23",