Browse Source

修改获取number类型时间戳

huangbin 4 years ago
parent
commit
21162ff29b
2 changed files with 9 additions and 8 deletions
  1. 0 8
      src/common/methods/format/index.ts
  2. 9 0
      src/utils/time/index.ts

+ 0 - 8
src/common/methods/format/index.ts

@@ -74,11 +74,3 @@ export function formatTime(value: string | Date, type: TIME) {
     if (value) return moment(value).format(str);
     return value;
 }
-
-/**
- * 获取number类型时间戳
- * @returns 
- */
-export function getTimeValue(): number {
-    return moment().valueOf()
-}

+ 9 - 0
src/utils/time/index.ts

@@ -0,0 +1,9 @@
+import moment from "moment";
+
+/**
+ * 获取number类型时间戳
+ * @returns 
+ */
+export function getTimeValue(): number {
+    return moment().valueOf()
+}