Skip to content

Commit eaf2bfe

Browse files
committed
docs: update Chinese translations and improve documentation clarity
- Translated various sections of the documentation to Chinese for better accessibility. - Enhanced clarity in explanations and examples across multiple files, including box shadow, drop shadow, and layout events. - Removed outdated content and improved structure in the new architecture documentation. - Added usage notes and examples for better understanding of concepts like PlatformColor and native modules.
1 parent 77f26fa commit eaf2bfe

File tree

184 files changed

+3906
-10184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+3906
-10184
lines changed

cndocs/boxshadowvalue.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,56 @@ title: BoxShadowValue 对象类型
1818
}
1919
```
2020

21-
## 键和值
21+
## 属性与值
2222

2323
### `offsetX`
2424

2525
在 x 轴上的偏移量。它可以是正数或负数。正数表示向右,负数表示向左。
2626

2727
| 类型 | 可选 |
28-
| ---------------- | -------- |
29-
| number \| string | No |
28+
| ---------------- | ---- |
29+
| number \| string | |
3030

3131
### `offsetY`
3232

3333
在 y 轴上的偏移量。它可以是正数或负数。正数表示向上,负数表示向下。
3434

3535
| 类型 | 可选 |
36-
| ---------------- | -------- |
37-
| number \| string | No |
36+
| ---------------- | ---- |
37+
| number \| string | |
3838

3939
### `blurRadius`
4040

4141
表示用于 [高斯模糊](https://en.wikipedia.org/wiki/Gaussian_blur) 算法的半径。值越大,阴影越模糊。仅非负值有效。默认值为 0。
4242

4343
| 类型 | 可选 |
44-
| --------------- | -------- |
45-
| numer \| string | Yes |
44+
| --------------- | ---- |
45+
| numer \| string | |
4646

4747
### `spreadDistance`
4848

4949
阴影扩展的距离。正值会使阴影变大,负值会使阴影变小。
5050

5151
| 类型 | 可选 |
52-
| --------------- | -------- |
53-
| numer \| string | Yes |
52+
| --------------- | ---- |
53+
| numer \| string | |
5454

5555
### `color`
5656

5757
阴影的颜色。默认值为 `black`
5858

5959
| 类型 | 可选 |
60-
| -------------------- | -------- |
61-
| [color](./colors.md) | Yes |
60+
| -------------------- | ---- |
61+
| [color](./colors.md) | |
6262

6363
### `inset`
6464

6565
是否为内阴影。内阴影会出现在元素的边框盒内部,而不是外部。
6666

6767
| 类型 | 可选 |
68-
| ------- | -------- |
69-
| boolean | Yes |
68+
| ------- | ---- |
69+
| boolean | |
7070

71-
## 由以下对象使用
71+
## 被下列属性使用
7272

7373
- [`boxShadow`](./view-style-props.md#boxshadow)

cndocs/document-nodes.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
id: document-nodes
3-
title: Document nodes
3+
title: 文档节点
44
---
55

6-
Document nodes represent a complete native view tree. Apps using native navigation would provide a separate document node for each screen. Apps not using native navigation would generally provide a single document for the whole app (similar to single-page apps on Web).
6+
文档节点表示完整的原生视图树。使用原生导航的应用会为每个屏幕提供单独的文档节点。不使用原生导航的应用通常会为整个应用提供单个文档(类似于 Web 上的单页应用)。
77

88
```SnackPlayer ext=js&name=Document%20instance%20example
99
import * as React from 'react';
@@ -22,7 +22,7 @@ export default function AccessingDocument() {
2222
const ref = React.useRef(null);
2323
2424
React.useEffect(() => {
25-
// Get the main text input in the screen and focus it after initial load.
25+
// 获取屏幕中的主文本输入框并在初始加载后聚焦它。
2626
const element = ref.current;
2727
const doc = element.ownerDocument;
2828
const textInput = doc.getElementById('main-text-input');
@@ -37,39 +37,39 @@ export default function AccessingDocument() {
3737

3838
---
3939

40-
## Reference
40+
## 参考
4141

42-
### Web-compatible API
42+
### Web 兼容 API
4343

44-
From [`Document`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement):
44+
来自 [`Document`](https://developer.mozilla.org/zh-CN/docs/Web/API/HTMLElement)
4545

46-
- Properties
47-
- [`childElementCount`](https://developer.mozilla.org/en-US/docs/Web/API/Document/childElementCount)
48-
- [`children`](https://developer.mozilla.org/en-US/docs/Web/API/Document/children)
49-
- [`documentElement`](https://developer.mozilla.org/en-US/docs/Web/API/Document/documentElement)
50-
- [`firstElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Document/firstElementChild)
51-
- [`lastElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Document/lastElementChild)
52-
- Methods
53-
- [`getElementById()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById)
46+
- 属性
47+
- [`childElementCount`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/childElementCount)
48+
- [`children`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/children)
49+
- [`documentElement`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/documentElement)
50+
- [`firstElementChild`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/firstElementChild)
51+
- [`lastElementChild`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/lastElementChild)
52+
- 方法
53+
- [`getElementById()`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document/getElementById)
5454

55-
From [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node):
55+
来自 [`Node`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node)
5656

57-
- Properties
58-
- [`childNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
59-
- [`firstChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/firstChild)
60-
- [`isConnected`](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
61-
- [`lastChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/lastChild)
62-
- [`nextSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSibling)
63-
- [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName)
64-
- [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType)
65-
- [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue)
66-
- [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument)
67-
- [`parentElement`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement)
68-
- [`parentNode`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode)
69-
- [`previousSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/previousSibling)
70-
- [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)
71-
- Methods
72-
- [`compareDocumentPosition()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition)
73-
- [`contains()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
74-
- [`getRootNode()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
75-
- [`hasChildNodes()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/hasChildNodes)
57+
- 属性
58+
- [`childNodes`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/childNodes)
59+
- [`firstChild`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/firstChild)
60+
- [`isConnected`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/isConnected)
61+
- [`lastChild`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/lastChild)
62+
- [`nextSibling`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nextSibling)
63+
- [`nodeName`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nodeName)
64+
- [`nodeType`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nodeType)
65+
- [`nodeValue`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/nodeValue)
66+
- [`ownerDocument`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/ownerDocument)
67+
- [`parentElement`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/parentElement)
68+
- [`parentNode`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/parentNode)
69+
- [`previousSibling`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/previousSibling)
70+
- [`textContent`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/textContent)
71+
- 方法
72+
- [`compareDocumentPosition()`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/compareDocumentPosition)
73+
- [`contains()`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/contains)
74+
- [`getRootNode()`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/getRootNode)
75+
- [`hasChildNodes()`](https://developer.mozilla.org/zh-CN/docs/Web/API/Node/hasChildNodes)

cndocs/dropshadowvalue.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
id: dropshadowvalue
3-
title: DropShadowValue Object Type
3+
title: DropShadowValue 对象类型
44
---
55

6-
The `DropShadowValue` object is taken by the [`filter`](./view-style-props.md#filter) style prop for the `dropShadow` function. It is comprised of 2 or 3 lengths and an optional color. These values collectively define the drop shadow's color, position, and blurriness.
6+
`DropShadowValue` 对象类型由 [`filter`](./view-style-props.md#filter) 样式属性的 `dropShadow` 函数所使用。它由 2 或 3 个长度和一个可选的颜色组成。这些值共同定义了投影的颜色、位置和模糊程度。
77

8-
## Example
8+
## 示例
99

1010
```js
1111
{
@@ -16,40 +16,40 @@ The `DropShadowValue` object is taken by the [`filter`](./view-style-props.md#fi
1616
}
1717
```
1818

19-
## Keys and values
19+
## 属性与值
2020

2121
### `offsetX`
2222

23-
The offset on the x-axis. This can be positive or negative. A positive value indicates right and negative indicates left.
23+
在 x 轴上的偏移量。它可以是正数或负数。正数表示向右,负数表示向左。
2424

25-
| Type | Optional |
26-
| ---------------- | -------- |
27-
| number \| string | No |
25+
| 类型 | 可选 |
26+
| ---------------- | ---- |
27+
| number \| string | |
2828

2929
### `offsetY`
3030

31-
The offset on the y-axis. This can be positive or negative. A positive value indicates up and negative indicates down.
31+
在 y 轴上的偏移量。它可以是正数或负数。正数表示向上,负数表示向下。
3232

33-
| Type | Optional |
34-
| ---------------- | -------- |
35-
| number \| string | No |
33+
| 类型 | 可选 |
34+
| ---------------- | ---- |
35+
| number \| string | |
3636

3737
### `standardDeviation`
3838

39-
Represents the standard deviation used in the [Guassian blur](https://en.wikipedia.org/wiki/Gaussian_blur) algorithm. The larger the value the blurrier the shadow is. Only non-negative values are valid. The default is 0.
39+
表示用于 [高斯模糊](https://en.wikipedia.org/wiki/Gaussian_blur) 算法的标准差。值越大,阴影越模糊。仅非负值有效。默认值为 0。
4040

41-
| Type | Optional |
42-
| --------------- | -------- |
43-
| numer \| string | Yes |
41+
| 类型 | 可选 |
42+
| --------------- | ---- |
43+
| numer \| string | |
4444

4545
### `color`
4646

47-
The color of the shadow. The default is `black`.
47+
阴影的颜色。默认值为 `black`
4848

49-
| Type | Optional |
50-
| -------------------- | -------- |
51-
| [color](./colors.md) | Yes |
49+
| 类型 | 可选 |
50+
| -------------------- | ---- |
51+
| [color](./colors.md) | |
5252

53-
## Used by
53+
## 被下列属性使用
5454

5555
- [`filter`](./view-style-props.md#filter)

0 commit comments

Comments
 (0)