【发布时间】:2022-08-18 18:17:00
【问题描述】:
尝试在此 answer 之后动态导入语言环境。
import(`dayjs/locale/${currentLocale}`)
.then(() => {
dayjs.locale(currentLocale);
});
得到错误:
第 26 行的无效调用:import(\"dayjs/locale/\" + currentLocale)
我猜它更像是“网络方式” - 在this 之后,我知道我需要在编译时加载所有 dayjs 语言环境。
我怎么做?
标签: react-native dayjs