Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

单元测试里面有国际化i18n 报错 #32

Open
mgbq opened this issue May 25, 2018 · 1 comment
Open

单元测试里面有国际化i18n 报错 #32

mgbq opened this issue May 25, 2018 · 1 comment

Comments

@mgbq
Copy link

mgbq commented May 25, 2018

大神你好,我参考了你的vue单元测试博客,你的demo没有使用i18n国际化,我的有使用,并且我是这样引入i18n的 import i18n from '@/lang'
Vue.use(Element, {
size: 'medium', // set element-ui default size
i18n: (key, value) => i18n.t(key, value)
})

可是它报错了 信息为 ERROR LOG: TypeError: undefined is not an object (evaluating 'i18n._t')
改成
import i18n from '@/lang'
Vue.use(i18n) 也是报这个错,百忙中求解答

@Molunerfinn
Copy link
Owner

并没有使用过i18n。。无法提供帮助诶,希望有类似的经验的人能帮忙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants