import PropTypes from 'prop-types'; import { useTheme } from '@mui/material/styles'; import { IconUser, IconKey, IconBrandGithubCopilot, IconSitemap } from '@tabler/icons-react'; import { InputAdornment, OutlinedInput, Stack, FormControl, InputLabel, Select, MenuItem } from '@mui/material'; import { LocalizationProvider, DateTimePicker } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import dayjs from 'dayjs'; import LogType from '../type/LogType'; require('dayjs/locale/zh-cn'); // ---------------------------------------------------------------------- export default function TableToolBar({ filterName, handleFilterName, userIsAdmin }) { const theme = useTheme(); const grey500 = theme.palette.grey[500]; return ( <> 令牌名称 } /> 模型名称 } /> { if (value === null) { handleFilterName({ target: { name: 'start_timestamp', value: 0 } }); return; } handleFilterName({ target: { name: 'start_timestamp', value: value.unix() } }); }} slotProps={{ actionBar: { actions: ['clear', 'today', 'accept'] } }} /> { if (value === null) { handleFilterName({ target: { name: 'end_timestamp', value: 0 } }); return; } handleFilterName({ target: { name: 'end_timestamp', value: value.unix() } }); }} slotProps={{ actionBar: { actions: ['clear', 'today', 'accept'] } }} /> 类型 {userIsAdmin && ( 渠道ID } /> 用户名称 } /> )} ); } TableToolBar.propTypes = { filterName: PropTypes.object, handleFilterName: PropTypes.func, userIsAdmin: PropTypes.bool };