Vue.js v3.0 教程(Vue3 教程)log(this.a) 或 vm.$watch('a', newValue => this.myMethod()) 。因为箭头函数并没有 this , this 会作为变量一直向上级词法作用域查找,直至找到为止,经常导致 Uncaught TypeError: Cannot read property of undefined 或 Uncaught TypeError: this.myMethod globalProperties 暴露它。 插件 编写插件 插件 - 189 - 本文档使用 书栈网 · BookStack.CN 构建 该函数将接收一个 key 字符串,我们将使用它在用户提供的选项中查找转换后的字符串。 1. // plugins/i18n.js 2. export default { 3. install: (app, options) => { 4. app0 码力 | 368 页 | 3.97 MB | 1 年前3
共 1 条
- 1













