我是歌谣 放弃很容易 但是坚持一定很酷 微信公众号关注前端小歌谣 带你加入前端巅峰人才交流群
第一步 依赖安装
yarn add @haxqer/ra-language-chinese
第二步 引入
import chineseMessages from '@haxqer/ra-language-chinese'
const i18nProvider = polyglotI18nProvider(() => chineseMessages, 'zh');
第三步 配置
<Admin dataProvider={dataProvider} layout={appLayout} i18nProvider={i18nProvider} > <Resource name='t_order' list={OrderList} create={OrderCreate} edit={OrderEdit} /> {/* <Resource name='t_prod_category' list={ CategoryList } /> */} <Resource name = 't_prod_style' list = {ListGuesser} /> <CustomRoutes> {/* <Route path='demo/*' element={<CategoryList/>}></Route> */} <Route path = "mydemo/*" element = {<MyDemo/>} /> <Route path = "categoryman/*" element = {<CategoryList/>} /> </CustomRoutes> </Admin>