TypeError: _vm.$t is not a function
at Proxy.render (eval at ./node_modules/vue-loader/lib/template-compiler/index.js?{"id":"data-v-7a5a5a4a","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./node_modules/vux/src/components/alert/index.vue (app.js:4113),
查了好多资料也没解决,快要崩溃了。
我觉得第一没有好好看文档,第二也不想用 vux2 脚手架,因为文档写明了要配合 vux-loader 使用,也有不使用脚手架的配置方式。而你的报错信息里没有任何 vux-loader 的影子。

相信是第一点没好好看文档,没有注意到这句话!!
现在用的是vue-cli3,在vue.config.js里面配置

页面报错

/main.js

依赖版本:
"vue": "^2.5.17",
"vue-loader": "^14.2.3",
"vue-router": "^3.0.2",
"vuex": "^3.0.1",
"vuex-i18n": "^1.10.5",
"vux": "^2.9.2",
"vux-loader": "^1.2.9",
"yaml-loader": "^0.5.0"
然后国际化功能是可以正常使用的,就是会报错。
找了很久没找到什么原因
同这个问题.....
相信是第一点没好好看文档,没有注意到这句话!!
还是不行啊~

我自己定位到Alert这个组件有翻译问题,去掉或者硬编码就好了。
我自己定位到Alert这个组件有翻译问题,去掉或者硬编码就好了。
你的那个是也是Vue-cli 3.x的版本出现这个问题吧
已经解决,感谢
------------------ 原始邮件 ------------------
发件人: "notifications"notifications@github.com;
发送时间: 2019年6月19日(星期三) 下午2:58
收件人: "airyland/vux"vux@noreply.github.com;
抄送: "偏水瓶的双鱼座"1595135476@qq.com;"Author"author@noreply.github.com;
主题: Re: [airyland/vux] 在使用vux组件的时候总是报_vm.$t is not a function (#2550)
我自己定位到Alert这个组件有翻译问题,去掉或者硬编码就好了。
你的那个是也是Vue-cli 3.x的版本出现这个问题吧
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@caoshining 怎么解决的?