🚚 稍微调整了下位置

This commit is contained in:
BTMuli
2023-11-02 17:10:34 +08:00
parent c55f5b9ab8
commit 38ef0bfcca
3 changed files with 18 additions and 24 deletions

View File

@@ -6,7 +6,7 @@
import { app, fs, path } from "@tauri-apps/api";
import { timestampToDate } from "./t2D";
import { timestampToDate } from "./toolFunc";
/**
* @description 获取 UIGF 头部信息

View File

@@ -1,23 +0,0 @@
/**
* @file utils t2D.ts
* @description time to date 时间戳转换为日期工具类
* @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.2.3
*/
/**
* @description 时间戳转换为日期
* @since Alpha v0.2.3
* @param {number} timestamp - 时间戳(毫秒)
* @returns {string} 日期 2021-01-01 00:00:00
*/
export function timestampToDate(timestamp: number): string {
return new Date(timestamp).toLocaleString("zh", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
});
}

View File

@@ -23,6 +23,23 @@ export function stamp2LastTime(time: number): string {
.padStart(2, "0")}:${second.toFixed(0).padStart(2, "0")}`;
}
/**
* @description 时间戳转换为日期
* @since Alpha v0.2.3
* @param {number} timestamp - 时间戳(毫秒)
* @returns {string} 日期 2021-01-01 00:00:00
*/
export function timestampToDate(timestamp: number): string {
return new Date(timestamp).toLocaleString("zh", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
});
}
/**
* @description 获取 deviceID
* @since Beta v0.3.4