Skip to content

Commit ec6cac4

Browse files
axetroyjikkai
authored andcommitted
Input: fix autocomplete property is not compatible with native ElemeFE#12513 (ElemeFE#12514)
* fix ElemeFE#12513 * fix: fallback for autoComplete and print deprecated warning * fix: fix auto-complete property in select component * fix default complete value * Docs: Update document for autocomplete property change * Docs: remove redundant documents * remove unnecessary console log message\ * Update select.md * fix: add missing declaration in select.d.ts
1 parent c782b0d commit ec6cac4

File tree

16 files changed

+57
-24
lines changed

16 files changed

+57
-24
lines changed

examples/docs/en-US/dialog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ The content of Dialog can be anything, even a table or a form. This example show
147147
<el-dialog title="Shipping address" :visible.sync="dialogFormVisible">
148148
<el-form :model="form">
149149
<el-form-item label="Promotion name" :label-width="formLabelWidth">
150-
<el-input v-model="form.name" auto-complete="off"></el-input>
150+
<el-input v-model="form.name" autocomplete="off"></el-input>
151151
</el-form-item>
152152
<el-form-item label="Zones" :label-width="formLabelWidth">
153153
<el-select v-model="form.region" placeholder="Please select a zone">

examples/docs/en-US/form.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,10 @@ This example shows how to customize your own validation rules to finish a two-fa
538538
```html
539539
<el-form :model="ruleForm2" status-icon :rules="rules2" ref="ruleForm2" label-width="120px" class="demo-ruleForm">
540540
<el-form-item label="Password" prop="pass">
541-
<el-input type="password" v-model="ruleForm2.pass" auto-complete="off"></el-input>
541+
<el-input type="password" v-model="ruleForm2.pass" autocomplete="off"></el-input>
542542
</el-form-item>
543543
<el-form-item label="Confirm" prop="checkPass">
544-
<el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off"></el-input>
544+
<el-input type="password" v-model="ruleForm2.checkPass" autocomplete="off"></el-input>
545545
</el-form-item>
546546
<el-form-item label="Age" prop="age">
547547
<el-input v-model.number="ruleForm2.age"></el-input>
@@ -719,7 +719,7 @@ This example shows how to customize your own validation rules to finish a two-fa
719719
{ type: 'number', message: 'age must be a number'}
720720
]"
721721
>
722-
<el-input type="age" v-model.number="numberValidateForm.age" auto-complete="off"></el-input>
722+
<el-input type="age" v-model.number="numberValidateForm.age" autocomplete="off"></el-input>
723723
</el-form-item>
724724
<el-form-item>
725725
<el-button type="primary" @click="submitForm('numberValidateForm')">Submit</el-button>

examples/docs/en-US/input.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,8 @@ Search data from server-side.
654654
| suffix-icon | suffix icon class | string |||
655655
|rows | number of rows of textarea, only works when `type` is 'textarea' | number || 2 |
656656
|autosize | whether textarea has an adaptive height, only works when `type` is 'textarea'. Can accept an object, e.g. { minRows: 2, maxRows: 6 } | boolean / object || false |
657-
|auto-complete | same as `auto-complete` in native input | string | on/off | off |
657+
|autocomplete | same as `autocomplete` in native input | string | on/off | off |
658+
|auto-complete | @DEPRECATED in next major version | string | on/off | off |
658659
|name | same as `name` in native input | string |||
659660
| readonly | same as `readonly` in native input | boolean || false |
660661
|max | same as `max` in native input ||||

examples/docs/en-US/select.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@ If the binding value of Select is an object, make sure to assign `value-key` as
670670
| collapse-tags | whether to collapse tags to a text when multiple selecting | boolean || false |
671671
| multiple-limit | maximum number of options user can select when `multiple` is `true`. No limit when set to 0 | number || 0 |
672672
| name | the name attribute of select input | string |||
673-
| auto-complete | the autocomplete attribute of select input | string || off |
673+
| autocomplete | the autocomplete attribute of select input | string || off |
674+
| auto-complete | @DEPRECATED in next major version | string || off |
674675
| placeholder | placeholder | string || Select |
675676
| filterable | whether Select is filterable | boolean || false |
676677
| allow-create | whether creating new items is allowed. To use this, `filterable` must be true | boolean || false |

examples/docs/es/dialog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ El contenido del Diálogo puede ser cualquier cosa, incluso una tabla o un formu
151151
<el-dialog title="Shipping address" :visible.sync="dialogFormVisible">
152152
<el-form :model="form">
153153
<el-form-item label="Promotion name" :label-width="formLabelWidth">
154-
<el-input v-model="form.name" auto-complete="off"></el-input>
154+
<el-input v-model="form.name" autocomplete="off"></el-input>
155155
</el-form-item>
156156
<el-form-item label="Zones" :label-width="formLabelWidth">
157157
<el-select v-model="form.region" placeholder="Please select a zone">

examples/docs/es/form.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,10 @@ Este ejemplo muestra cómo personalizar sus propias reglas de validación para f
539539
```html
540540
<el-form :model="ruleForm2" status-icon :rules="rules2" ref="ruleForm2" label-width="120px" class="demo-ruleForm">
541541
<el-form-item label="Password" prop="pass">
542-
<el-input type="password" v-model="ruleForm2.pass" auto-complete="off"></el-input>
542+
<el-input type="password" v-model="ruleForm2.pass" autocomplete="off"></el-input>
543543
</el-form-item>
544544
<el-form-item label="Confirm" prop="checkPass">
545-
<el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off"></el-input>
545+
<el-input type="password" v-model="ruleForm2.checkPass" autocomplete="off"></el-input>
546546
</el-form-item>
547547
<el-form-item label="Age" prop="age">
548548
<el-input v-model.number="ruleForm2.age"></el-input>
@@ -721,7 +721,7 @@ Este ejemplo muestra cómo personalizar sus propias reglas de validación para f
721721
{ type: 'number', message: 'age must be a number'}
722722
]"
723723
>
724-
<el-input type="age" v-model.number="numberValidateForm.age" auto-complete="off"></el-input>
724+
<el-input type="age" v-model.number="numberValidateForm.age" autocomplete="off"></el-input>
725725
</el-form-item>
726726
<el-form-item>
727727
<el-button type="primary" @click="submitForm('numberValidateForm')">Submit</el-button>

examples/docs/es/input.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,8 @@ Búsqueda de datos desde el servidor.
633633
| suffix-icon | clase del icono de sufijo | string |||
634634
| rows | número de filas, sólo funciona cuando `type` es 'textarea'. | number || 2 |
635635
| autosize | si textarea tiene una altura adaptativa, sólo funciona cuando el`type` es 'textarea'. Puede aceptar un objeto, p. ej. { minRows: 2, maxRows: 6 } | boolean / object || false |
636-
| auto-complete | igual que `auto-complete` en el input nativo | string | on/off | off |
636+
| autocomplete | igual que `autocomplete` en el input nativo | string | on/off | off |
637+
| auto-complete | @DEPRECATED in next major version | string | on/off | off |
637638
| name | igual que `name` en el input nativo | string |||
638639
| readonly | igual que `readonly` en el input nativo | boolean || false |
639640
| max | igual que `max` en el input nativo ||||

examples/docs/es/select.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ Si el valor de encuadernación de Select es un objeto, asegúrese de asignar `va
676676
| clearable | si el single select puede ser limpiable | boolean || false |
677677
| multiple-limit | maximo numero de opciones que el usuario puede seleccionar cuando `multiple` es `true`. Sin límite cuando se fija a 0 | number || 0 |
678678
| name | el atributo `name` del input seleccionado | string |||
679-
| auto-complete | el atributo `autocomplete` del input seleccionado | string || off |
679+
| autocomplete | el atributo `autocomplete` del input seleccionado | string || off |
680+
| auto-complete | @DEPRECATED in next major version | string || off |
680681
| placeholder | placeholder | string || Select |
681682
| filterable | si Select es filtrable | boolean || false |
682683
| allow-create | si esta permitido crear nuevos items. Para usar esto, `filterable` debe ser `true`. | boolean || false |

examples/docs/zh-CN/dialog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Dialog 组件的内容可以是任意的,甚至可以是表格或表单,下
144144
<el-dialog title="收货地址" :visible.sync="dialogFormVisible">
145145
<el-form :model="form">
146146
<el-form-item label="活动名称" :label-width="formLabelWidth">
147-
<el-input v-model="form.name" auto-complete="off"></el-input>
147+
<el-input v-model="form.name" autocomplete="off"></el-input>
148148
</el-form-item>
149149
<el-form-item label="活动区域" :label-width="formLabelWidth">
150150
<el-select v-model="form.region" placeholder="请选择活动区域">

examples/docs/zh-CN/form.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,10 @@ W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.h
527527
```html
528528
<el-form :model="ruleForm2" status-icon :rules="rules2" ref="ruleForm2" label-width="100px" class="demo-ruleForm">
529529
<el-form-item label="密码" prop="pass">
530-
<el-input type="password" v-model="ruleForm2.pass" auto-complete="off"></el-input>
530+
<el-input type="password" v-model="ruleForm2.pass" autocomplete="off"></el-input>
531531
</el-form-item>
532532
<el-form-item label="确认密码" prop="checkPass">
533-
<el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off"></el-input>
533+
<el-input type="password" v-model="ruleForm2.checkPass" autocomplete="off"></el-input>
534534
</el-form-item>
535535
<el-form-item label="年龄" prop="age">
536536
<el-input v-model.number="ruleForm2.age"></el-input>
@@ -706,7 +706,7 @@ W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.h
706706
{ type: 'number', message: '年龄必须为数字值'}
707707
]"
708708
>
709-
<el-input type="age" v-model.number="numberValidateForm.age" auto-complete="off"></el-input>
709+
<el-input type="age" v-model.number="numberValidateForm.age" autocomplete="off"></el-input>
710710
</el-form-item>
711711
<el-form-item>
712712
<el-button type="primary" @click="submitForm('numberValidateForm')">提交</el-button>

0 commit comments

Comments
 (0)