import React from 'react' import { ListBase, Title, ListToolbar, Pagination, Datagrid, TextField, EditButton, DeleteButton, BooleanField } from 'react-admin' import { Card } from '@mui/material'; const MyList = ({ children, actions, filters, title, ...props }) => ( <ListBase {...props}> <Title title={title} /> <ListToolbar filters={filters} actions={actions} /> <Card> {children} </Card> <Pagination /> </ListBase> ); const RGuesserList = (props) => { return ( <Admin dataProvider={jsonServerProvider('https:// jsonplaceholder.typicode.com')}> <Resource name="posts" list={ListGuesser} /> </Admin> ) } export default RGuesserList
ListGuesser直接渲染列表