feat(formItem): Change slot label formItem to scopedSlots (#2522)

* Change slot label from formItem to scoupedSlot

* Improve docs with scoped value

* Update documentation for scopedSlots on FormItem
This commit is contained in:
Dinarte Jesus 2021-07-15 02:44:29 +02:00 committed by GitHub
parent 270f4bc97a
commit b791aca744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 6 deletions

View File

@ -13,7 +13,9 @@
class="el-form-item__label"
:style="labelStyle"
>
<slot name="label">{{ label + elForm.labelSuffix }}</slot>
<slot name="label" :label="label + elForm.labelSuffix">
{{ label + elForm.labelSuffix }}
</slot>
</label>
</LabelWrap>
<div class="el-form-item__content" :style="contentStyle">

View File

@ -644,11 +644,11 @@ All components in a Form inherit their `size` attribute from that Form. Similarl
| Name | Description |
|------|--------|
| — | content of Form Item |
| label | content of label |
### Form-Item Scoped Slot
| Name | Description |
|---------------|-------------|
| label | Custom content to display on label. The scope parameter is { label } |
| error | Custom content to display validation message. The scope parameter is { error } |
### Form-Item Methods

View File

@ -661,12 +661,12 @@ Todos los componentes de un formulario heredan su atributo `size`. De manera sim
| Nombre | Descripción |
| ------ | ------------------------ |
| — | contenido del Form Item |
| label | contenido de la etiqueta |
### Form-Item Scoped Slot
| Name | Description |
| ----- | ------------------------------------------------------------ |
| label | Custom content to display on label. The scope parameter is { label } |
| error | Contenido personalizado para mostrar el mensaje de validación. El parámetro del scope es { error } |
### Form-Item Metodo

View File

@ -644,11 +644,11 @@ Tout les composants d'un formulaire héritent leur attribut `size` de ce formula
| Nom | Description |
|------|--------|
| — | Contenu de Form Item. |
| label | Contenu du label. |
### Slot avec portée de Form-Item
| Nom | Description |
|---------------|-------------|
| label | Custom content to display on label. The scope parameter is { label } |
| error | Contenu personnalisé pour les messages de validation. Le paramètre du scope est { error }. |
### Méthodes de Form-Item

View File

@ -645,11 +645,11 @@ The component has been upgraded with a flex layout to replace the old float layo
| Name | Description |
|------|--------|
| — | フォームアイテムの内容 |
| label | ラベルの内容 |
### フォームアイテムのスコープスロット
| Name | Description |
|---------------|-------------|
| label | Custom content to display on label. The scope parameter is { label } |
| error | Custom content to display validation message. The scope parameter is { error } |
### フォームアイテムのメソッド

View File

@ -639,11 +639,11 @@ W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.h
| name | 说明 |
|------|--------|
| — | Form Item 的内容 |
| label | 标签文本的内容 |
### Form-Item Scoped Slot
| name | 说明 |
|--------|--------|
| label | Custom content to display on label. The scope parameter is { label } |
| error | 自定义表单校验信息的显示方式,参数为 { error } |
### Form-Item Methods