mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +08:00
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:
parent
270f4bc97a
commit
b791aca744
@ -13,7 +13,9 @@
|
|||||||
class="el-form-item__label"
|
class="el-form-item__label"
|
||||||
:style="labelStyle"
|
:style="labelStyle"
|
||||||
>
|
>
|
||||||
<slot name="label">{{ label + elForm.labelSuffix }}</slot>
|
<slot name="label" :label="label + elForm.labelSuffix">
|
||||||
|
{{ label + elForm.labelSuffix }}
|
||||||
|
</slot>
|
||||||
</label>
|
</label>
|
||||||
</LabelWrap>
|
</LabelWrap>
|
||||||
<div class="el-form-item__content" :style="contentStyle">
|
<div class="el-form-item__content" :style="contentStyle">
|
||||||
|
@ -644,11 +644,11 @@ All components in a Form inherit their `size` attribute from that Form. Similarl
|
|||||||
| Name | Description |
|
| Name | Description |
|
||||||
|------|--------|
|
|------|--------|
|
||||||
| — | content of Form Item |
|
| — | content of Form Item |
|
||||||
| label | content of label |
|
|
||||||
|
|
||||||
### Form-Item Scoped Slot
|
### Form-Item Scoped Slot
|
||||||
| Name | Description |
|
| 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 } |
|
| error | Custom content to display validation message. The scope parameter is { error } |
|
||||||
|
|
||||||
### Form-Item Methods
|
### Form-Item Methods
|
||||||
|
@ -661,12 +661,12 @@ Todos los componentes de un formulario heredan su atributo `size`. De manera sim
|
|||||||
| Nombre | Descripción |
|
| Nombre | Descripción |
|
||||||
| ------ | ------------------------ |
|
| ------ | ------------------------ |
|
||||||
| — | contenido del Form Item |
|
| — | contenido del Form Item |
|
||||||
| label | contenido de la etiqueta |
|
|
||||||
|
|
||||||
### Form-Item Scoped Slot
|
### Form-Item Scoped Slot
|
||||||
|
|
||||||
| Name | Description |
|
| 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 } |
|
| error | Contenido personalizado para mostrar el mensaje de validación. El parámetro del scope es { error } |
|
||||||
|
|
||||||
### Form-Item Metodo
|
### Form-Item Metodo
|
||||||
|
@ -644,11 +644,11 @@ Tout les composants d'un formulaire héritent leur attribut `size` de ce formula
|
|||||||
| Nom | Description |
|
| Nom | Description |
|
||||||
|------|--------|
|
|------|--------|
|
||||||
| — | Contenu de Form Item. |
|
| — | Contenu de Form Item. |
|
||||||
| label | Contenu du label. |
|
|
||||||
|
|
||||||
### Slot avec portée de Form-Item
|
### Slot avec portée de Form-Item
|
||||||
| Nom | Description |
|
| 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 }. |
|
| error | Contenu personnalisé pour les messages de validation. Le paramètre du scope est { error }. |
|
||||||
|
|
||||||
### Méthodes de Form-Item
|
### Méthodes de Form-Item
|
||||||
|
@ -645,11 +645,11 @@ The component has been upgraded with a flex layout to replace the old float layo
|
|||||||
| Name | Description |
|
| Name | Description |
|
||||||
|------|--------|
|
|------|--------|
|
||||||
| — | フォームアイテムの内容 |
|
| — | フォームアイテムの内容 |
|
||||||
| label | ラベルの内容 |
|
|
||||||
|
|
||||||
### フォームアイテムのスコープスロット
|
### フォームアイテムのスコープスロット
|
||||||
| Name | Description |
|
| 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 } |
|
| error | Custom content to display validation message. The scope parameter is { error } |
|
||||||
|
|
||||||
### フォームアイテムのメソッド
|
### フォームアイテムのメソッド
|
||||||
|
@ -639,11 +639,11 @@ W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.h
|
|||||||
| name | 说明 |
|
| name | 说明 |
|
||||||
|------|--------|
|
|------|--------|
|
||||||
| — | Form Item 的内容 |
|
| — | Form Item 的内容 |
|
||||||
| label | 标签文本的内容 |
|
|
||||||
|
|
||||||
### Form-Item Scoped Slot
|
### Form-Item Scoped Slot
|
||||||
| name | 说明 |
|
| name | 说明 |
|
||||||
|--------|--------|
|
|--------|--------|
|
||||||
|
| label | Custom content to display on label. The scope parameter is { label } |
|
||||||
| error | 自定义表单校验信息的显示方式,参数为 { error } |
|
| error | 自定义表单校验信息的显示方式,参数为 { error } |
|
||||||
|
|
||||||
### Form-Item Methods
|
### Form-Item Methods
|
||||||
|
Loading…
Reference in New Issue
Block a user