报错"/>
Must be called at the top of a `setup` function;导入i18n报错
在ts文件导入
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
会导致页面报错奔溃
解决:
将上述导入换成:
import i18n from '@/i18n';
const { t } = i18n.global;
更多推荐
Must be called at the top of a `setup` function;导入i18n报错
发布评论