From 62676c33ff868ff46b7d34c223546d11e2a2cf3e Mon Sep 17 00:00:00 2001
From: 赵士淞 <zhaoss@yhzhg.cn>
Date: Wed, 08 Feb 2023 08:26:48 +0000
Subject: [PATCH] Merge branch 'zhaoss' of http://192.168.1.110:5678/r/pms-upgrade into master
---
eladmin-web-master/src/components/Crud/crud.js | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/eladmin-web-master/src/components/Crud/crud.js b/eladmin-web-master/src/components/Crud/crud.js
index 146cfc8..f882df4 100644
--- a/eladmin-web-master/src/components/Crud/crud.js
+++ b/eladmin-web-master/src/components/Crud/crud.js
@@ -560,6 +560,20 @@
}
},
/**
+ * 月日格式化
+ * @param {Object} timestamp 时间戳
+ */
+ toMonthDay(timestamp) {
+ if (timestamp == null) {
+ return
+ } else {
+ const system = new Date(timestamp)
+ const month = system.getMonth() + 1 < 10 ? '0' + (system.getMonth() + 1) : system.getMonth() + 1
+ const date = system.getDate() < 10 ? '0' + system.getDate() : system.getDate()
+ return month + '-' + date
+ }
+ },
+ /**
* 时间格式化
* @param {Object} timestamp
*/
--
Gitblit v1.9.3