Skip to content

Commit 93ecb65

Browse files
authored
fix markdown link gammar error and update zh link on Children.md (#1758)
1 parent f9dd062 commit 93ecb65

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/reference/react/Children.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ function SeparatorList({ children }) {
8383
#### 参数 {/*children-foreach-parameters*/}
8484
8585
* `children`:组件接收到的 [`children` 属性](/learn/passing-props-to-a-component#passing-jsx-as-children)。
86-
* `fn`:和 [数组的 `forEach` 方法]((https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)) 中的回调类似,是你希望为每个子节点执行的函数。当这个函数执行时,对应的子节点和其下标将分别作为函数的第一、第二个参数,下标从 `0` 开始自增。
87-
* **可选** `thisArg`:为 `fn` 函数绑定 [`this`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this)。默认值为 `undefined`
86+
* `fn`:和 [数组的 `forEach` 方法](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) 中的回调类似,是你希望为每个子节点执行的函数。当这个函数执行时,对应的子节点和其下标将分别作为函数的第一、第二个参数,下标从 `0` 开始自增。
87+
* **可选** `thisArg`:为 `fn` 函数绑定 [`this`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/this)。默认值为 `undefined`
8888
8989
#### 返回值 {/*children-foreach-returns*/}
9090
@@ -121,8 +121,8 @@ function RowList({ children }) {
121121
#### 参数 {/*children-map-parameters*/}
122122
123123
* `children`:组件接收到的 [`children` 属性](/learn/passing-props-to-a-component#passing-jsx-as-children)。
124-
* `fn`:和 [数组的 `map` 方法](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) 中的回调类似,是一个映射函数。当这个函数执行时,对应的子节点和其下标将分别作为函数的第一、第二个参数,下标从 `0` 开始自增。你需要使这个映射函数返回一个 React 节点,它可以是一个空节点(`null``undefined`)。
125-
* **可选** `thisArg`:为 `fn` 函数绑定 [`this`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this)。默认值为 `undefined`
124+
* `fn`:和 [数组的 `map` 方法](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/map) 中的回调类似,是一个映射函数。当这个函数执行时,对应的子节点和其下标将分别作为函数的第一、第二个参数,下标从 `0` 开始自增。你需要使这个映射函数返回一个 React 节点,它可以是一个空节点(`null``undefined`)。
125+
* **可选** `thisArg`:为 `fn` 函数绑定 [`this`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/this)。默认值为 `undefined`
126126
127127
#### 返回值 {/*children-map-returns*/}
128128
@@ -492,7 +492,7 @@ export default function RowList({ children }) {
492492
493493
### 将 children 转化为数组 {/*converting-children-to-an-array*/}
494494
495-
通过调用 `Children.toArray(children)``children` 变为一个常规的 JavaScript 数组。这使得你能够使用 [`filter`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), [`sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort), 或者 [`reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) 等数组内置方法来操作这个数组。
495+
通过调用 `Children.toArray(children)``children` 变为一个常规的 JavaScript 数组。这使得你能够使用 [`filter`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), [`sort`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/sort), 或者 [`reverse`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) 等数组内置方法来操作这个数组。
496496
497497
<Sandpack>
498498

0 commit comments

Comments
 (0)