Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
awxiaoxian2020 committed Aug 11, 2023
1 parent bcf73a3 commit 9fef281
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 97 deletions.
7 changes: 1 addition & 6 deletions src/content/reference/react-dom/components/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,8 @@ title: "<progress>"

除此之外,`<progress>` 还支持以下属性:

<<<<<<< HEAD
- [`max`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/progress#attr-max):一个数字,表示指定的最大 `value`。默认值为 `1`
- [`value`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/progress#attr-value):一个介于 `0``max` 之间的数字。如果不确定具体的进度,那么该值可以为 `null``value` 表示完成了多少进度。
=======
* [`max`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#max): A number. Specifies the maximum `value`. Defaults to `1`.
* [`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#value): A number between `0` and `max`, or `null` for indeterminate progress. Specifies how much was done.
>>>>>>> ae06008d574e44992133f4cc74563ce968fde04c
- [`value`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/progress#value):一个介于 `0``max` 之间的数字。如果不确定具体的进度,那么该值可以为 `null``value` 表示完成了多少进度。

---

Expand Down
34 changes: 8 additions & 26 deletions src/content/reference/react-dom/components/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,39 +50,21 @@ title: "<select>"

以下 `<select>` 属性均可用于受控与非受控选择框组件:

<<<<<<< HEAD
* [`autoComplete`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-autocomplete):字符串,用于指定可能的 [自动完成行为](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes/autocomplete#values) 之一。
* [`autoFocus`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-autofocus):布尔值。如果为 `true`,React 将在挂载时聚焦该元素。
* [`autoComplete`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#autocomplete):字符串,用于指定可能的 [自动完成行为](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes/autocomplete#values) 之一。
* [`autoFocus`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#autofocus):布尔值。如果为 `true`,React 将在挂载时聚焦该元素。
* `children``<select>` 接受 [`<option>`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/option)[`<optgroup>`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/optgroup)[`<datalist>`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/optgroup) 组件作为子元素。只要最终渲染的是其中之一,你也可以传递自己的组件。如果最终渲染的是 `<option>`,则每个 `<option>` 都必须具有 `value` 属性。
* [`disabled`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-disabled):布尔值。如果为 `true`,选择框将不会交互并展示为暗淡状态(dimmed)。
* [`form`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-form):字符串,表示此选择框所属的 `<form>``id`。如果未指定,则为最近的父表单。
* [`multiple`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-multiple):布尔值。如果为 `true`,则浏览器允许 [多选](#enabling-multiple-selection)
* [`name`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-name):字符串,用于指定此选择框的名称,该名称将在 [提交表单时](#reading-the-select-box-value-when-submitting-a-form) 一起提交。
* [`disabled`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#disabled):布尔值。如果为 `true`,选择框将不会交互并展示为暗淡状态(dimmed)。
* [`form`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#form):字符串,表示此选择框所属的 `<form>``id`。如果未指定,则为最近的父表单。
* [`multiple`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#multiple):布尔值。如果为 `true`,则浏览器允许 [多选](#enabling-multiple-selection)
* [`name`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#name):字符串,用于指定此选择框的名称,该名称将在 [提交表单时](#reading-the-select-box-value-when-submitting-a-form) 一起提交。
* `onChange`:一个 [`Event` 处理函数](/reference/react-dom/components/common#event-handler),其对于 [受控选择框](#controlling-a-select-box-with-a-state-variable) 是必需的。当用户选择不同的选项时立即触发。此行为类似于浏览器 [`input` 事件](https://developer.mozilla.org/zh-CN/docs/Web/API/HTMLElement/input_event)
* `onChangeCapture`:与 `onChange` 类似,但是是在 [捕获阶段](/learn/responding-to-events#capture-phase-events) 触发的。
* [`onInput`](https://developer.mozilla.org/zh-CN/docs/Web/API/HTMLElement/input_event):一个 [`Event` 处理函数](/reference/react-dom/components/common#event-handler)。当用户更改值时立即触发。由于历史原因,在 React 习惯于使用 `onChange`,工作方式类似。
* `onInputCapture`:与 `onInput` 类似,但是是在 [捕获阶段](/learn/responding-to-events#capture-phase-events) 触发的。
* [`onInvalid`](https://developer.mozilla.org/zh-CN/docs/Web/API/HTMLInputElement/invalid_event):一个 [`Event` 处理函数](/reference/react-dom/components/common#event-handler)。如果输入的内容在表单提交时未通过验证,则会触发此事件。与内置的 `invalid` 事件不同,React 的 `onInvalid` 事件可以进行冒泡。
* `onInvalidCapture`:与 `onInvalid` 类似,但是是在 [捕获阶段](/learn/responding-to-events#capture-phase-events) 触发的。
* [`required`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-required):布尔值。如果为 `true`,则必须提供值才能提交表单。
* [`size`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#attr-size):数字。当指定 `multiple={true}` 时可选,表示同时可见的项目数。
=======
* [`autoComplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#autocomplete): A string. Specifies one of the possible [autocomplete behaviors.](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values)
* [`autoFocus`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#autofocus): A boolean. If `true`, React will focus the element on mount.
* `children`: `<select>` accepts [`<option>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option), [`<optgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup), and [`<datalist>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup) components as children. You can also pass your own components as long as they eventually render one of the allowed components. If you pass your own components that eventually render `<option>` tags, each `<option>` you render must have a `value`.
* [`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#disabled): A boolean. If `true`, the select box will not be interactive and will appear dimmed.
* [`form`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#form): A string. Specifies the `id` of the `<form>` this select box belongs to. If omitted, it's the closest parent form.
* [`multiple`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#multiple): A boolean. If `true`, the browser allows [multiple selection.](#enabling-multiple-selection)
* [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#name): A string. Specifies the name for this select box that's [submitted with the form.](#reading-the-select-box-value-when-submitting-a-form)
* `onChange`: An [`Event` handler](/reference/react-dom/components/common#event-handler) function. Required for [controlled select boxes.](#controlling-a-select-box-with-a-state-variable) Fires immediately when the user picks a different option. Behaves like the browser [`input` event.](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event)
* `onChangeCapture`: A version of `onChange` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
* [`onInput`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event): An [`Event` handler](/reference/react-dom/components/common#event-handler) function. Fires immediately when the value is changed by the user. For historical reasons, in React it is idiomatic to use `onChange` instead which works similarly.
* `onInputCapture`: A version of `onInput` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
* [`onInvalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event): An [`Event` handler](/reference/react-dom/components/common#event-handler) function. Fires if an input fails validation on form submit. Unlike the built-in `invalid` event, the React `onInvalid` event bubbles.
* `onInvalidCapture`: A version of `onInvalid` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
* [`required`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#required): A boolean. If `true`, the value must be provided for the form to submit.
* [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#size): A number. For `multiple={true}` selects, specifies the preferred number of initially visible items.
>>>>>>> ae06008d574e44992133f4cc74563ce968fde04c
* [`required`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#required):布尔值。如果为 `true`,则必须提供值才能提交表单。
* [`size`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/select#size):数字。当指定 `multiple={true}` 时可选,表示同时可见的项目数。

#### 注意 {/*caveats*/}

Expand Down
49 changes: 12 additions & 37 deletions src/content/reference/react-dom/components/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,14 @@ title: "<textarea>"

以下 `<textarea>` 属性均可用于受控与非受控组件:

<<<<<<< HEAD
* [`autoComplete`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-autocomplete):可以为 `'on'``'off'`,表示自动完成的行为。
* [`autoFocus`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-autofocus):布尔值。如果为 `true`,React 将在挂载时聚焦该元素。
* [`autoComplete`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#autocomplete):可以为 `'on'``'off'`,表示自动完成的行为。
* [`autoFocus`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#autofocus):布尔值。如果为 `true`,React 将在挂载时聚焦该元素。
* `children``<textarea>` 不接受子元素,如果要设置初始值,请使用 `defaultValue`
* [`cols`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-cols):数字,表示默认宽度,以平均字符宽度计算。默认为 `20`
* [`disabled`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-disabled):布尔值。如果为 `true`,则输入框将不可交互且显示为禁用状态(dimmed)。
* [`form`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-form):字符串,表示此文本框所属的 `<form>``id`。如果未指定,则为最近的父表单。
* [`maxLength`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-maxlength):数字,表示文本的最大长度。
* [`minLength`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-minlength):数字,表示文本的最小长度。
* [`cols`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#cols):数字,表示默认宽度,以平均字符宽度计算。默认为 `20`
* [`disabled`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#disabled):布尔值。如果为 `true`,则输入框将不可交互且显示为禁用状态(dimmed)。
* [`form`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#form):字符串,表示此文本框所属的 `<form>``id`。如果未指定,则为最近的父表单。
* [`maxLength`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#maxlength):数字,表示文本的最大长度。
* [`minLength`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#minlength):数字,表示文本的最小长度。
* [`name`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input#name):字符串,表示在表单提交时与此输入框关联的名称。
* `onChange`:一个 [`Event` 处理函数](/reference/react-dom/components/common#event-handler)。对于 [受控文本框](#controlling-a-text-area-with-a-state-variable),在用户更改输入值时立即触发(例如,对于每个按键)。此行为类似于浏览器 [`input` 事件](https://developer.mozilla.org/zh-CN/docs/Web/API/HTMLElement/input_event)
* `onChangeCapture`:与 `onChange` 类似,但是是在 [捕获阶段](/learn/responding-to-events#capture-phase-events) 触发。
Expand All @@ -62,35 +61,11 @@ title: "<textarea>"
* `onInvalidCapture`:与 `onInvalid` 类似,但是是在 [捕获阶段](/learn/responding-to-events#capture-phase-events) 触发。
* [`onSelect`](https://developer.mozilla.org/zh-CN/docs/Web/API/HTMLTextAreaElement/select_event):一个 [`Event` 处理函数](/reference/react-dom/components/common#event-handler)。当 `<textarea>` 的选择内容发生变化后触发。React 扩展了 `onSelect` 事件,还会在空选择和编辑(可能会影响选择)时触发。
* `onSelectCapture`: 与 `onSelect` 类似,但是是在 [捕获阶段](/learn/responding-to-events#capture-phase-events) 触发。
* [`placeholder`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-placeholder):字符串,表示当文本框的值为空时,以淡色显示的占位符。
* [`readOnly`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-readonly):布尔值,如果为 `true`,文本框将无法被用户编辑。
* [`required`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-required):布尔值,如果为 `true`,则必须提供值才能在表单中提交。
* [`rows`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-rows):数字,表示默认高度,以平均字符高度计算。默认为 `2`
* [`wrap`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#attr-wrap):可以是 `'hard'``'soft'``'off'` 中的一个值,表示提交表单时文本应如何换行。
=======
* [`autoComplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#autocomplete): Either `'on'` or `'off'`. Specifies the autocomplete behavior.
* [`autoFocus`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#autofocus): A boolean. If `true`, React will focus the element on mount.
* `children`: `<textarea>` does not accept children. To set the initial value, use `defaultValue`.
* [`cols`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols): A number. Specifies the default width in average character widths. Defaults to `20`.
* [`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#disabled): A boolean. If `true`, the input will not be interactive and will appear dimmed.
* [`form`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#form): A string. Specifies the `id` of the `<form>` this input belongs to. If omitted, it's the closest parent form.
* [`maxLength`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#maxlength): A number. Specifies the maximum length of text.
* [`minLength`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#minlength): A number. Specifies the minimum length of text.
* [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name): A string. Specifies the name for this input that's [submitted with the form.](#reading-the-textarea-value-when-submitting-a-form)
* `onChange`: An [`Event` handler](/reference/react-dom/components/common#event-handler) function. Required for [controlled text areas.](#controlling-a-text-area-with-a-state-variable) Fires immediately when the input's value is changed by the user (for example, it fires on every keystroke). Behaves like the browser [`input` event.](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event)
* `onChangeCapture`: A version of `onChange` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
* [`onInput`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event): An [`Event` handler](/reference/react-dom/components/common#event-handler) function. function. Fires immediately when the value is changed by the user. For historical reasons, in React it is idiomatic to use `onChange` instead which works similarly.
* `onInputCapture`: A version of `onInput` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
* [`onInvalid`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event): An [`Event` handler](/reference/react-dom/components/common#event-handler) function. Fires if an input fails validation on form submit. Unlike the built-in `invalid` event, the React `onInvalid` event bubbles.
* `onInvalidCapture`: A version of `onInvalid` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
* [`onSelect`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/select_event): An [`Event` handler](/reference/react-dom/components/common#event-handler) function. Fires after the selection inside the `<textarea>` changes. React extends the `onSelect` event to also fire for empty selection and on edits (which may affect the selection).
* `onSelectCapture`: A version of `onSelect` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
* [`placeholder`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#placeholder): A string. Displayed in a dimmed color when the text area value is empty.
* [`readOnly`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#readonly): A boolean. If `true`, the text area is not editable by the user.
* [`required`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#required): A boolean. If `true`, the value must be provided for the form to submit.
* [`rows`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows): A number. Specifies the default height in average character heights. Defaults to `2`.
* [`wrap`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap): Either `'hard'`, `'soft'`, or `'off'`. Specifies how the text should be wrapped when submitting a form.
>>>>>>> ae06008d574e44992133f4cc74563ce968fde04c
* [`placeholder`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#placeholder):字符串,表示当文本框的值为空时,以淡色显示的占位符。
* [`readOnly`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#readonly):布尔值,如果为 `true`,文本框将无法被用户编辑。
* [`required`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#required):布尔值,如果为 `true`,则必须提供值才能在表单中提交。
* [`rows`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#rows):数字,表示默认高度,以平均字符高度计算。默认为 `2`
* [`wrap`](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/textarea#wrap):可以是 `'hard'``'soft'``'off'` 中的一个值,表示提交表单时文本应如何换行。

#### 注意 {/*caveats*/}

Expand Down
Loading

0 comments on commit 9fef281

Please sign in to comment.