跳到主要内容

umi4 配置 antd 默认中文模式

· 阅读需 1 分钟

2023年02月24日17:32:20


import { defineConfig } from "umi";
import zhCN from 'antd/locale/zh_CN';
export default defineConfig({
plugins: ['@umijs/plugins/dist/antd'],



antd: {
configProvider: {
locale: zhCN
},
},

routes: [
{ path: "/", component: "index" },
{ path: "/docs", component: "docs" },
],
npmClient: 'yarn',
base: '/',
hash: true,


});