fix: clarify client amounts and log date filters

This commit is contained in:
hectorzhao
2026-08-27 19:50:12 +08:00
parent ec721bf95a
commit 33fa3709d9
18 changed files with 136 additions and 82 deletions
+4 -3
View File
@@ -9,6 +9,7 @@ export type DateRangeValue = {
type DateRangeInputProps = {
className?: string;
label?: string;
placeholder?: string;
value: DateRangeValue;
onChange: (value: DateRangeValue) => void;
};
@@ -66,7 +67,7 @@ function getCalendarDays(viewDate: Date) {
});
}
export function DateRangeInput({ className = '', label, value, onChange }: DateRangeInputProps) {
export function DateRangeInput({ className = '', label, placeholder = '选择提交时间区间', value, onChange }: DateRangeInputProps) {
const [open, setOpen] = useState(false);
const [viewDate, setViewDate] = useState(() => parseDate(value.start) ?? new Date());
const startDate = parseDate(value.start);
@@ -83,8 +84,8 @@ export function DateRangeInput({ className = '', label, value, onChange }: DateR
return `${value.start} 至 ...`;
}
return '选择提交时间区间';
}, [value.end, value.start]);
return placeholder;
}, [placeholder, value.end, value.start]);
function moveMonth(offset: number) {
setViewDate((current) => new Date(current.getFullYear(), current.getMonth() + offset, 1));
+1 -1
View File
@@ -3,7 +3,7 @@ import { Download, RotateCcw } from 'lucide-react';
import type { SystemLogExportResult } from '@/api/adminApi';
import { Button } from './Button';
type Filters = { keyword?: string; level?: string; module?: string; range?: string };
type Filters = { keyword?: string; level?: string; module?: string; range?: string; createdAtFrom?: string; createdAtTo?: string };
export function SystemLogExport({
portal,