当前位置 : 主页 > 手机开发 > harmonyos >

前端项目实战贰佰肆拾贰react-admin+material ui-react-admin-resource默认生成路由

来源:互联网 收集:自由互联 发布时间:2023-08-26
const App = () = ( Admin dataProvider={dataProvider} dashboard={Dashboard} Resource name="customers" list={CustomerList} edit={CustomerEdit} / Resource name="orders" list={OrderList} edit={OrderEdit} options={{ label: 'Orders' }} / Resource


const App = () => (
    <Admin dataProvider={dataProvider} dashboard={Dashboard}>
        <Resource name="customers" list={CustomerList} edit={CustomerEdit} />
        <Resource name="orders" list={OrderList} edit={OrderEdit} options={{ label: 'Orders' }} />
        <Resource name="invoices" list={InvoiceList} />
        <Resource name="products" list={ProductList} edit={ProductEdit} create={ProductCreate} />
        <Resource name="categories" list={CategoryList} edit={CategoryEdit} create={CategoryCreate} />
        <Resource name="reviews" list={ReviewList} />
        <CustomRoutes>
            <Route path="/segments" element={<Segments />} />
        </CustomRoutes>
    </Admin>
);

运行结果

 

前端项目实战贰佰肆拾贰react-admin+material ui-react-admin-resource默认生成路由_react.js

网友评论