小编Vue*_*ion的帖子

vue-i18n this.$tc 不是一个函数

我的语言文件:

\n
AccountNotifications: {\n  createdWithName: 'Account \xc2\xab{account}\xc2\xbb created',\n  created: 'Account created | Accounts created',\n}\n
Run Code Online (Sandbox Code Playgroud)\n

我的提交方法

\n
submit() \n   this.$notifications.add({\n        type: 'success',\n        html: accounts.length === 1\n        ? this.$tc('AccountNotifications.created', 1)\n        : this.$tc('AccountNotifications.created', 2),\n  });\n
Run Code Online (Sandbox Code Playgroud)\n

我的输出

\n
app.js:290949 TypeError: this.$tc is not a function\n
Run Code Online (Sandbox Code Playgroud)\n

怎么了?

\n

vue.js vue-i18n

6
推荐指数
1
解决办法
4469
查看次数

标签 统计

vue-i18n ×1

vue.js ×1