<Admin dataProvider={dataProvider} layout={appLayout} i18nProvider={i18nProvider} > <Resource name='t_order' list={OrderList} create={OrderCreate} edit={OrderEdit} /> {/* <Resource name='t_prod_category' list={ CategoryList } /> */} </Admin>
const appLayout = (props: LayoutProps) => { return ( <Layout sx={ { '& .RaLayout-appFrame': { minHeight: '100%', height: '100%', margin: 0, padding: 0 }, '& .RaLayout-content:': { marginTop: 0, marginBottom: 0, padding: 0, minHeight: '100%', height: '100%' }, '& .RaLayout-contentWithSidebar': { margin: 0, padding: 0, minHeight: '100%', height: '100%' }, minHeight: '100%', height: '100%', margin: 0, padding: 0, } } {...props} appBar={appBar} menu={useAppMenu} // sidebar={mySidebar} /> ) }
sidebar={mySidebar}控制侧边栏得显示