This commit is contained in:
X1627315083@163.com
2026-03-20 13:37:58 +08:00
parent e00fe21e95
commit c1fee6c4a4
11 changed files with 185 additions and 22 deletions

View File

@@ -77,4 +77,16 @@ export const base64Tofile = (base64: string,name: string) => {
// 4. 创建 File 对象(可选)
const file = new File([blob], name, { type: mime })
return file
}
//获取当前时间2026-03-20 11:38:29
export const getCurrentTime = () => {
const now = new Date()
const currentTime =
now.getFullYear() + '-' +
String(now.getMonth() + 1).padStart(2, '0') + '-' +
String(now.getDate()).padStart(2, '0') + ' ' +
String(now.getHours()).padStart(2, '0') + ':' +
String(now.getMinutes()).padStart(2, '0') + ':' +
String(now.getSeconds()).padStart(2, '0')
return currentTime
}