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

Commit 8528b66

Browse files
authored
update props-default-this.md (#737)
1 parent cbb0caa commit 8528b66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/guide/migration/props-default-this.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ badges:
88

99
生成 prop 默认值的工厂函数不再能访问 `this`
1010

11-
替代方案
11+
取而代之的是
1212

13-
- 把组件接收到的原始 prop 作为参数传递给默认函数
13+
- 组件接收到的原始 prop 将作为参数传递给默认函数
1414

1515
- [inject](../composition-api-provide-inject.md) API 可以在默认函数中使用。
1616

@@ -21,8 +21,8 @@ export default {
2121
props: {
2222
theme: {
2323
default (props) {
24-
// `props` 是传递给组件的原始值。
25-
// 在任何类型/默认强制转换之前
24+
// `props` 是传递给组件的、
25+
// 在任何类型/默认强制转换之前的原始值,
2626
// 也可以使用 `inject` 来访问注入的 property
2727
return inject('theme', 'default-theme')
2828
}

0 commit comments

Comments
 (0)