前端项目实战肆拾肆-react-admin+material ui-踩坑-第贰层basename
我是歌谣 放弃很容易 但是坚持一定很酷 微信公众号关注前端小歌谣 带你加入前端巅峰人才交流群
<Grid style={{ flexGrow: "1", margin: "24px 0 0 24px" }} >
{/* <Routes>
<Route path="demo/t_prod_category/:code" element={<CategoryListData/>}></Route>
<Route path="demo/t_prod_style/:code" element={<CategoryListData/>}></Route>
</Routes> */}
<Admin
dataProvider={dataProvider}
basename='/demoman'
layout={appLayout}
>
<Resource name='t_prod_style'
list={CateGoryList} hasEdit />
<CustomRoutes>
<Route path="myFirstPage/:
mycode" element={<FirstPage />} />
<Route path="mySecondPage/:
mycode" element={<SecondPage />} />
</CustomRoutes>
</Admin>
</Grid>
basename就是最基本的url的值

浙公网安备 33010602011771号