mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 11:47:48 +08:00
docs(docs): remove .native (#2272)
This commit is contained in:
parent
d7c7e86955
commit
3ea408216a
@ -46,8 +46,8 @@ describe('Drawer', () => {
|
||||
`
|
||||
<el-drawer :title='title' v-model='visible'>
|
||||
<span>this is a sentence</span>
|
||||
<el-button @click.native='dialogVisible = false'>cancel</el-button>
|
||||
<el-button type='primary' @click.native='dialogVisible = false'>confirm</el-button>
|
||||
<el-button @click='dialogVisible = false'>cancel</el-button>
|
||||
<el-button type='primary' @click='dialogVisible = false'>confirm</el-button>
|
||||
</el-drawer>
|
||||
`,
|
||||
() => ({
|
||||
|
@ -83,7 +83,7 @@ It includes all kinds of input items, such as `input`, `select`, `radio` and `ch
|
||||
[W3C](https://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2) regulates that
|
||||
> <i>When there is only one single-line text input field in a form, the user agent should accept Enter in that field as a request to submit the form.</i>
|
||||
|
||||
To prevent this behavior, you can add `@submit.native.prevent` on `<el-form>`.
|
||||
To prevent this behavior, you can add `@submit.prevent` on `<el-form>`.
|
||||
:::
|
||||
|
||||
### Inline form
|
||||
|
@ -569,7 +569,7 @@ When the the data is dynamically changed, you might want the table to have a max
|
||||
width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||
@click.prevent="deleteRow(scope.$index, tableData)"
|
||||
type="text"
|
||||
size="small">
|
||||
Remove
|
||||
|
@ -66,7 +66,7 @@ You can use the `close` event to add and remove tag dynamically.
|
||||
v-model="inputValue"
|
||||
ref="saveTagInput"
|
||||
size="mini"
|
||||
@keyup.enter.native="handleInputConfirm"
|
||||
@keyup.enter="handleInputConfirm"
|
||||
@blur="handleInputConfirm"
|
||||
>
|
||||
</el-input>
|
||||
|
@ -85,7 +85,7 @@ Incluye todo tipo de entradas, tales como `input`, `select`, `radio` y `checkbox
|
||||
|
||||
> <i>Cuando sólo hay un campo de entrada de texto de una sola línea en un formulario, el agente usuario debe aceptar <b>Enter</b> en ese campo como una solicitud para enviar el formulario.</i>
|
||||
|
||||
Para prevenir este comportamiento, puede agregar `@submit.native.prevent` on `<el-form>`.
|
||||
Para prevenir este comportamiento, puede agregar `@submit.prevent` on `<el-form>`.
|
||||
:::
|
||||
|
||||
### Formulario inline
|
||||
|
@ -569,7 +569,7 @@ Cuando los datos se modifican dinámicamente, es posible que necesite que la tab
|
||||
width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||
@click.prevent="deleteRow(scope.$index, tableData)"
|
||||
type="text"
|
||||
size="small">
|
||||
Eliminar
|
||||
|
@ -66,7 +66,7 @@ Puede utilizar el evento `close` para añadir y eliminar etiquetas dinámicament
|
||||
v-model="inputValue"
|
||||
ref="saveTagInput"
|
||||
size="mini"
|
||||
@keyup.enter.native="handleInputConfirm"
|
||||
@keyup.enter="handleInputConfirm"
|
||||
@blur="handleInputConfirm"
|
||||
>
|
||||
</el-input>
|
||||
|
@ -83,7 +83,7 @@ Il peut contenir toutes sortes de champs tels que `input`, `select`, `radio` et
|
||||
[W3C](https://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2) stipule que
|
||||
> <i>Lorsqu'il n'y a qu'un seul champ de type texte dans un formulaire, le navigateur devrait accepter la pression de la touche Entrée sur ce champ comme méthode de soumission du formulaire</i>
|
||||
|
||||
Pour éviter ce comportement, vous pouvez ajouter `@submit.native.prevent` dans `<el-form>`.
|
||||
Pour éviter ce comportement, vous pouvez ajouter `@submit.prevent` dans `<el-form>`.
|
||||
:::
|
||||
|
||||
### Formulaire horizontal
|
||||
|
@ -569,7 +569,7 @@ Quand les données changent dynamiquement, vous pouvez avoir besoin d'une hauteu
|
||||
width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||
@click.prevent="deleteRow(scope.$index, tableData)"
|
||||
type="text"
|
||||
size="small">
|
||||
Supprimer
|
||||
|
@ -66,7 +66,7 @@ Vous pouvez utiliser l'évènement `close` pour ajouter et supprimer des tags dy
|
||||
v-model="inputValue"
|
||||
ref="saveTagInput"
|
||||
size="mini"
|
||||
@keyup.enter.native="handleInputConfirm"
|
||||
@keyup.enter="handleInputConfirm"
|
||||
@blur="handleInputConfirm"
|
||||
>
|
||||
</el-input>
|
||||
|
@ -83,7 +83,7 @@
|
||||
[W3C](https://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2) は規制しているのは
|
||||
> <i>フォーム内に1つの単一行テキスト入力フィールドしかない場合、ユーザエージェントは、そのフィールドでのEnterをフォームの送信要求として受け入れるべきである。</i>
|
||||
|
||||
この動作を防ぐには、`<el-form>` に `@submit.native.prevent` を追加します。
|
||||
この動作を防ぐには、`<el-form>` に `@submit.prevent` を追加します。
|
||||
:::
|
||||
|
||||
### インラインフォーム
|
||||
|
@ -569,7 +569,7 @@
|
||||
width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||
@click.prevent="deleteRow(scope.$index, tableData)"
|
||||
type="text"
|
||||
size="small">
|
||||
Remove
|
||||
|
@ -66,7 +66,7 @@
|
||||
v-model="inputValue"
|
||||
ref="saveTagInput"
|
||||
size="mini"
|
||||
@keyup.enter.native="handleInputConfirm"
|
||||
@keyup.enter="handleInputConfirm"
|
||||
@blur="handleInputConfirm"
|
||||
>
|
||||
</el-input>
|
||||
|
@ -82,7 +82,7 @@
|
||||
W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2):
|
||||
> <i>When there is only one single-line text input field in a form, the user agent should accept Enter in that field as a request to submit the form.</i>
|
||||
|
||||
即:当一个 form 元素中只有一个输入框时,在该输入框中按下回车应提交该表单。如果希望阻止这一默认行为,可以在 `<el-form>` 标签上添加 `@submit.native.prevent`。
|
||||
即:当一个 form 元素中只有一个输入框时,在该输入框中按下回车应提交该表单。如果希望阻止这一默认行为,可以在 `<el-form>` 标签上添加 `@submit.prevent`。
|
||||
:::
|
||||
|
||||
### 行内表单
|
||||
|
@ -566,7 +566,7 @@
|
||||
width="120">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||
@click.prevent="deleteRow(scope.$index, tableData)"
|
||||
type="text"
|
||||
size="small">
|
||||
移除
|
||||
|
@ -66,7 +66,7 @@
|
||||
v-model="inputValue"
|
||||
ref="saveTagInput"
|
||||
size="small"
|
||||
@keyup.enter.native="handleInputConfirm"
|
||||
@keyup.enter="handleInputConfirm"
|
||||
@blur="handleInputConfirm"
|
||||
>
|
||||
</el-input>
|
||||
|
Loading…
Reference in New Issue
Block a user