| | |
| | | security: 'Security', |
| | | }, |
| | | create: { |
| | | title: 'Create' |
| | | title: 'Create', |
| | | empty: { |
| | | title: 'Data Empty', |
| | | desc: 'Please Create Data First', |
| | | button: 'Create Data', |
| | | }, |
| | | }, |
| | | update: { |
| | | title: 'Update' |
| | |
| | | security: '安全设置', |
| | | }, |
| | | create: { |
| | | title: '添加' |
| | | title: '添加', |
| | | empty: { |
| | | title: '暂无数据', |
| | | desc: '请先添加数据', |
| | | button: '添加数据' |
| | | }, |
| | | }, |
| | | update: { |
| | | title: '修改' |
| | |
| | | import { HotTub } from '@mui/icons-material'; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import MyCreateButton from './MyCreateButton'; |
| | | import { useTranslate } from 'react-admin'; |
| | | |
| | | const NotFound = ({ children, onClick, btnMsg }) => { |
| | | const navigate = useNavigate(); |
| | | |
| | | const translate = useTranslate(); |
| | | return ( |
| | | <Box |
| | | display="flex" |
| | |
| | | opacity: .5, |
| | | mt: 2 |
| | | }}> |
| | | Data Empty |
| | | {translate('create.empty.title')} |
| | | </Typography> |
| | | <Typography variant="subtitle1" gutterBottom sx={{ |
| | | fontSize: '1em', |
| | | opacity: .5, |
| | | mt: 2 |
| | | }}> |
| | | Please Create Data First |
| | | {translate('create.empty.desc')} |
| | | </Typography> |
| | | {children} |
| | | {!children && ( |
| | |
| | | mt: 2 |
| | | }} |
| | | > |
| | | {btnMsg || 'Create Data'} |
| | | {btnMsg || translate('create.empty.button')} |
| | | </Button> |
| | | )} |
| | | </Box> |