Vue3 Typescript Vite使用国际化 Vue-i18n 报错 Cannot read properties of undefined (reading ‘__composer‘)
Vue3 国际化 vue-i18n 报错
·
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘__composer’)
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '__composer') vue-i18n.esm-bundler.js:1756
at Proxy.mounted (vue-i18n.esm-bundler.js:1756:52)
at callWithErrorHandling (runtime-core.esm-bundler.js:155:22)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:164:21)
at hook.__weh.hook.__weh (runtime-core.esm-bundler.js:2687:29)
at flushPostFlushCbs (runtime-core.esm-bundler.js:358:32)
at flushJobs (runtime-core.esm-bundler.js:403:9)
解决方案
在使用的时候`import { createI18n } from 'vue-i18n’会报错,改成下面这种方式就好了
import { createI18n } from 'vue-i18n/index';
更多推荐
已为社区贡献7条内容
所有评论(0)