vue 2.0 使用多语言
Uncaught TypeError: Cannot read properties of undefined (reading '0')
at getWatcher (vue-i18n.common.js?08a3:148:1)
at Config (vue-i18n.common.js?08a3:246:1)
at plugin (vue-i18n.common.js?08a3:988:1)
at Vue.use (vue.runtime.esm.js?2b0e:5677:1)
at eval (main.js?56d7:14:1)
at ./src/main.js (app.js:4739:1)
at __webpack_require__ (app.js:770:30)
at fn (app.js:130:20)
at 1 (app.js:4801:18)
at __webpack_require__ (app.js:770:30)
版本问题。
把之前执行的 npm install vue-i18n@5 改成 npm install vue-i18n@6
即可。