runtime-core.esm-bundler.js:221 Uncaught SyntaxError: Need to install with `app.use` function (at message-compiler.esm-bundler.js:54:19)
at createCompileError (message-compiler.esm-bundler.js:54:19)
at createI18nError (vue-i18n.esm-bundler.js:100:12)
at useI18n (vue-i18n.esm-bundler.js:2219:15)
at setup (dynamicChart.vue:19:1)
at callWithErrorHandling (runtime-core.esm-bundler.js:158:18)
at setupStatefulComponent (runtime-core.esm-bundler.js:7236:25)
at setupComponent (runtime-core.esm-bundler.js:7197:36)
at mountComponent (runtime-core.esm-bundler.js:5599:7)
at processComponent (runtime-core.esm-bundler.js:5565:9)
at patch (runtime-core.esm-bundler.js:5040:11)
Describe the bug
vue节点内部,使用
const {t}=useI18n();
运行时会报下列错误:实际上再main.ts里已经app.use(i18n)了。
Your Example Website or App
暂时没有
Steps to Reproduce the Bug or Issue
vue3项目安装"vue-i18n": "9"依赖,main.ts里安装文档启用:
然后自定义一个vue节点,再里面
const {t}=useI18n();
。 然后再graph里添加该节点Expected behavior
能正常使用
Screenshots or Videos
No response
Platform
Additional context
No response