| | |
| | | errDesc: "error", |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | | loc: { |
| | | init: 'INITIALIZE' |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | errDesc: "异常", |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | | loc: { |
| | | init: '初始化' |
| | | } |
| | | } |
| | | }; |
| | | |
New file |
| | |
| | | import * as React from 'react'; |
| | | import { |
| | | Button |
| | | } from 'react-admin'; |
| | | |
| | | const InitButton = (props) => { |
| | | const { |
| | | onClick, |
| | | label, |
| | | icon, |
| | | ...rest |
| | | } = props; |
| | | |
| | | return ( |
| | | <Button |
| | | label={label} |
| | | onClick={handleClick} |
| | | {...sanitizeRestProps(rest)} |
| | | > |
| | | {icon} |
| | | </Button> |
| | | ); |
| | | }; |
| | | |
| | | const sanitizeRestProps = ({ |
| | | resource, |
| | | ...rest |
| | | }) => rest; |
| | | |
| | | export default InitButton; |
| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import InitButton from "./InitButton"; |
| | | import RepartitionIcon from '@mui/icons-material/Repartition'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <InitButton label='page.loc.init' icon={<RepartitionIcon />} /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='loc' /> |
| | | <MyExportButton /> |