- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit - 删除重复的旧配额说明块,保留新的当前配额设置显示 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
392 B
JavaScript
16 lines
392 B
JavaScript
export const iso8601 = (time) => toDate(time)
|
|
.toISOString()
|
|
.replace(/\.\d{3}Z$/, "Z");
|
|
export const toDate = (time) => {
|
|
if (typeof time === "number") {
|
|
return new Date(time * 1000);
|
|
}
|
|
if (typeof time === "string") {
|
|
if (Number(time)) {
|
|
return new Date(Number(time) * 1000);
|
|
}
|
|
return new Date(time);
|
|
}
|
|
return time;
|
|
};
|