新增提示Toast组件
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { postgrestGet, postgrestPut, postgrestPost, type PostgrestParams } from '../postgrest-client';
|
||||
import dayjs from 'dayjs';
|
||||
import { formatDate } from '../../utils';
|
||||
// 配置项接口
|
||||
export interface ConfigItem {
|
||||
id: number;
|
||||
@@ -15,20 +15,7 @@ export interface ConfigItem {
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
/**
|
||||
* 格式化日期
|
||||
* @param dateString 日期字符串
|
||||
* @returns 格式化后的日期字符串
|
||||
*/
|
||||
function formatDate(dateString: string): string {
|
||||
if (!dateString) return '';
|
||||
try {
|
||||
return dayjs(dateString).format('YYYY-MM-DD HH:mm:ss');
|
||||
} catch (error) {
|
||||
console.error('日期格式化失败:', error);
|
||||
return dateString;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user