align(生成记录样办·反馈): 还原旧版交互——去掉重置/清理数据/查看大图按钮,点击缩略图直接放大预览;按钮间距统一10px;前端 clearHistory 适配移除(后端 DELETE /history 端点保留)

This commit is contained in:
2026-09-06 22:25:20 +08:00
parent 4276a90236
commit e81aa9e02e
4 changed files with 27 additions and 106 deletions
@@ -17,11 +17,3 @@ export async function fetchHistoryUserOptions(): Promise<HistoryUserOption[]> {
const { data } = await http.get<unknown>('/api/admin/users', { params: { page: 1, page_size: 999 } })
return parseHistoryUserOptions(data)
}
/** 清空全部生成记录(验收反馈:生成记录数据要可清理)。返回清理条数。 */
export async function clearHistory(): Promise<number> {
const { data } = await http.delete<unknown>(HISTORY_ENDPOINT)
const record = data && typeof data === 'object' ? (data as Record<string, unknown>) : null
const removed = record?.data
return typeof removed === 'number' ? removed : 0
}