fix: clarify client amounts and log date filters
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user