标签:code lock react package pack 显示 range port tsx
首先按照antd官网配置
index.tsx/index.jsx
import React from ‘react‘;
import ReactDom from ‘react-dom‘;
import {ConfigProvider} from ‘antd‘;
import locale from ‘antd/es/locale/zh_CN‘;
import ‘moment/locale/zh-cn‘;
ReactDom.render(
<ConfigProvider locale={locale}>
<App />
</ConfigProvider>,
)
当前相关包版本:
react: ^16.13.1
antd: ^4.6.5
moment:^2.29.1
解决方案:
package.json中手动改成 moment: latest rm -rf node_modules rm -rf package-lock.json npm install
antd 日期选择框RangePicker 中英文混合显示解决方案
标签:code lock react package pack 显示 range port tsx
原文地址:https://www.cnblogs.com/lou-0820/p/14205097.html