cloud-web-corejs 1.0.54-dev.612 → 1.0.54-dev.613

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.612",
4
+ "version": "1.0.54-dev.613",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,4 +1,3 @@
1
- // import dayjs from "dayjs";
2
1
  import moment from "moment";
3
2
 
4
3
  let modules = {};
@@ -6,7 +5,6 @@ modules = {
6
5
  data() {
7
6
  return {
8
7
  timerMap: {},
9
- // dayjs: dayjs
10
8
  };
11
9
  },
12
10
  beforeDestroy() {
@@ -22,9 +20,11 @@ modules = {
22
20
  return moment;
23
21
  },
24
22
  utcToCst(utcStr) {
23
+ if (!utcStr) return utcStr;
25
24
  return moment.utc(utcStr).local().format("YYYY-MM-DD HH:mm:ss");
26
25
  },
27
26
  cstToUtc(localTime) {
27
+ if (!localTime) return localTime;
28
28
  return moment(localTime).utc().format("YYYY-MM-DD HH:mm:ss");
29
29
  },
30
30
  addFormatDateTime(date, num, type, format) {