We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
h
1 parent b7f401c commit b241d7bCopy full SHA for b241d7b
src/v2/guide/render-function.md
@@ -490,7 +490,7 @@ new Vue({
490
}
491
})
492
```
493
-<p class="tip">将 `h` 作为 `createElement` 的别名是 Vue 生态系统中的一个通用惯例,实际上也是 JSX 所要求的,如果在作用域中 `h` 失去作用,在应用中会触发报错。</p>
+<p class="tip">将 `h` 作为 `createElement` 的别名是 Vue 生态系统中的一个通用惯例,实际上也是 JSX 所要求的。从 Vue 的 Babel 插件的 [3.4.0 版本](https://github.com/vuejs/babel-plugin-transform-vue-jsx#h-auto-injection)开始,我们会在以 ES2015 语法声明的含有 JSX 的任何方法和 getter 中 (不是函数或箭头函数中) 自动注入 `const h = this.$createElement`,这样你就可以去掉 `(h)` 参数了。对于更早版本的插件,如果 `h` 在当前作用域中不可用,应用会抛错。</p>
494
495
更多关于 JSX 映射到 JavaScript,阅读 [使用文档](https://github.com/vuejs/jsx#installation)。
496
0 commit comments