Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Commit cbb0caa

Browse files
authored
update render-function-api.md (#738)
1 parent d201594 commit cbb0caa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/guide/migration/render-function-api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default {
133133

134134
### 2.x 语法
135135

136-
在 2.x 中,注册一个组件后,把组件名作为字符串传给渲染函数的第一个参数,渲染函数可以正常的工作
136+
在 2.x 中,注册一个组件后,把组件名作为字符串传递给渲染函数的第一个参数,它可以正常地工作
137137

138138
```js
139139
// 2.x
@@ -159,7 +159,7 @@ export default {
159159

160160
### 3.x 语法
161161

162-
在 3.x 中,由于 VNode 是上下文无关的,不能再用字符串 ID 隐式查找已注册组件。相反地,需要使用一个导入的 `resolveComponent` 方法:
162+
在 3.x 中,由于 VNode 是上下文无关的,不能再用字符串 ID 隐式查找已注册组件。取而代之的是,需要使用一个导入的 `resolveComponent` 方法:
163163

164164
```js
165165
// 3.x
@@ -184,9 +184,9 @@ export default {
184184

185185
全局导入 `h` 意味着任何包含 Vue 组件的库都将在某处包含 `import { h } from 'vue'`。这会带来一些开销,因为它需要库作者在其构建设置中正确配置 Vue 的外部化:
186186

187-
- Vue 不应绑定到库中
188-
- 对于模块构建,导入应该保持独立,由最终用户的打包器处理
189-
- 对于 UMD / browser 构建版本,应该首先尝试全局 Vue.h,不存在时再使用 require 调用
187+
- Vue 不应打包到库中
188+
- 对于模块构建版本,导入应该保持独立,并由终端用户的打包器处理
189+
- 对于 UMD / 浏览器构建版本,应该首先尝试全局 Vue.h,不存在时再使用 require 调用
190190

191191
## 下一步
192192

0 commit comments

Comments
 (0)