新拉的框架, 关闭国际化,配置
export const antd= {
config:{
locale:{}
}
}
报错



为啥我看不到图?
为啥我看不到图?
看不到吗
“locale.antd: false” 就可以关闭国际化了
可以用这个 api 来自定义
https://umijs.org/plugins/plugin-antd#config
https://ant.design/components/config-provider-cn/
这样引用bao报错

用 runtime 的写法
// src/app.ts
export const antd = {
componentSize:'small'
}
用 runtime 的写法
// src/app.ts export const antd = { componentSize:'small' }
配置了后还是报错

@569202812 这里的设计有点问题,配置中的 antd 的 config 配置了才会开启运行时配置。你需要在配置里面写上 antd:{config:{}}
@569202812 这里的设计有点问题,配置中的 antd 的 config 配置了才会开启运行时配置。你需要在配置里面写上
antd:{config:{}}
配置了可以了, 日期还需要在app.tsx里面配置下
import 'moment/locale/zh-cn';
@569202812 这里的设计有点问题,配置中的 antd 的 config 配置了才会开启运行时配置。你需要在配置里面写上
antd:{config:{}}配置了可以了, 日期还需要在app.tsx里面配置下
import 'moment/locale/zh-cn';
具体怎么配的能讲讲吗,看得我一脸懵逼
@569202812 这里的设计有点问题,配置中的 antd 的 config 配置了才会开启运行时配置。你需要在配置里面写上
antd:{config:{}}配置了可以了, 日期还需要在app.tsx里面配置下
import 'moment/locale/zh-cn';具体怎么配的能讲讲吗,看得我一脸懵逼
config 文件 添加antd:{config:{}}
app.tsx 文件 添加
import 'moment/locale/zh-cn';
export const antd= {
config:{
locale: zhCN // 引用antd的语言包
}
}
Most helpful comment
配置了可以了, 日期还需要在app.tsx里面配置下
import 'moment/locale/zh-cn';