Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: translate input #1682

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/reference/react-dom/components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ title: "<input>"

`<input>` 支持所有 [常见的元素属性](/reference/react-dom/components/common#props)。

- [`formAction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#formaction): A string or function. Overrides the parent `<form action>` for `type="submit"` and `type="image"`. When a URL is passed to `action` the form will behave like a standard HTML form. When a function is passed to `formAction` the function will handle the form submission. See [`<form action>`](/reference/react-dom/components/form#props).
[`formAction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#formaction): 字符串或函数。设置了 `type="submit"` `type="image"` 属性的 `input` 标签,会覆盖父表单对应属性 `<form action>`。当向 `formAction` 传递 URL 时,表单会表现为标准 HTML 表单;当传递函数时,该函数将处理表单提交。详见 [`<form action>`](/reference/react-dom/components/form#props)

You can [make an input controlled](#controlling-an-input-with-a-state-variable) by passing one of these props:
你可以通过传递以下属性之一来[使输入框成为受控组件](#controlling-an-input-with-a-state-variable)

* `checked`:布尔值,控制复选框或单选按钮是否被选中。
* `value`:字符串,控制文本框的输入文本(如果是单选按钮,则为其表单数据)。
Expand Down