feat(module_example): 增强demo模块功能

添加时间格式化工具函数
扩展demo表单项和接口字段
优化日期时间字段处理和JSON展示
移除冗余的时间格式化逻辑
This commit is contained in:
zhangtao
2026-01-13 02:00:47 +08:00
parent 846e9724ab
commit cbb9a2c5f5
4 changed files with 25 additions and 54 deletions
+4
View File
@@ -13,6 +13,10 @@ export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): str
return dayjs(date).format(format);
}
export function formatToTime(time?: dayjs.ConfigType, format = "HH:mm:ss"): string {
return dayjs(time).format(format);
}
export const useNow = (immediate = true) => {
let timer: ReturnType<typeof setInterval>;