docs: improved documentation for el-form (#12635)

* Docs: Document el-form label-position attribute

Adds improved documentation to the el-form `label-position` attribute, which behaves differently when used with and without `label-width`. This has been a source of confusion for myself and others:

https://github.com/ElemeFE/element/issues/8477

Thanks!

* Document el-form label-position attribute (zh-CN, needs translation)

* Document el-form label-position attribute (es)

* Update form.md
pull/12765/head
Kaveet Laxmidas 2018-09-13 21:51:37 -05:00 committed by hetech
parent 9f345d89c0
commit 0bc07d7ec4
3 changed files with 3 additions and 3 deletions

View File

@ -835,7 +835,7 @@ All components in a Form inherit their `size` attribute from that Form. Similarl
| model| data of form component | object | — | — | | model| data of form component | object | — | — |
| rules | validation rules of form | object | — | — | | rules | validation rules of form | object | — | — |
| inline | whether the form is inline | boolean | — | false | | inline | whether the form is inline | boolean | — | false |
| label-position | position of label | string | left / right / top | right | | label-position | position of label. If set to 'left' or 'right', `label-width` prop is also required | string | left / right / top | right |
| label-width | width of label, and all its direct child form items will inherit this value | string | — | — | | label-width | width of label, and all its direct child form items will inherit this value | string | — | — |
| label-suffix | suffix of the label | string | — | — | | label-suffix | suffix of the label | string | — | — |
| show-message | whether to show the error message | boolean | — | true | | show-message | whether to show the error message | boolean | — | true |

View File

@ -840,7 +840,7 @@ Todos los componentes de un formulario heredan su atributo `size`. De manera sim
| model | Datos del componente | object | — | — | | model | Datos del componente | object | — | — |
| rules | Reglas de validación | object | — | — | | rules | Reglas de validación | object | — | — |
| inline | Si el form es inline | boolean | — | false | | inline | Si el form es inline | boolean | — | false |
| label-position | Posicion de la etiqueta | string | left / right / top | right | | label-position | Posicion de la etiqueta. Si esta 'left' o 'right', también se necesita el prop `label-width` | string | left / right / top | right |
| label-width | ancho de la etiqueta, y todos los form items directos descendientes heredarán este valor | string | — | — | | label-width | ancho de la etiqueta, y todos los form items directos descendientes heredarán este valor | string | — | — |
| label-suffix | sufijo de la etiqueta | string | — | — | | label-suffix | sufijo de la etiqueta | string | — | — |
| show-message | si mostrar o no el mensaje de error | boolean | — | true | | show-message | si mostrar o no el mensaje de error | boolean | — | true |

View File

@ -823,7 +823,7 @@ W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.h
| model | 表单数据对象 | object | — | — | | model | 表单数据对象 | object | — | — |
| rules | 表单验证规则 | object | — | — | | rules | 表单验证规则 | object | — | — |
| inline | 行内表单模式 | boolean | — | false | | inline | 行内表单模式 | boolean | — | false |
| label-position | 表单域标签的位置 | string | right/left/top | right | | label-position | 表单域标签的位置,如果值为 left 或者 right 时,则需要设置 `label-width` | string | right/left/top | right |
| label-width | 表单域标签的宽度,作为 Form 直接子元素的 form-item 会继承该值 | string | — | — | | label-width | 表单域标签的宽度,作为 Form 直接子元素的 form-item 会继承该值 | string | — | — |
| label-suffix | 表单域标签的后缀 | string | — | — | | label-suffix | 表单域标签的后缀 | string | — | — |
| show-message | 是否显示校验错误信息 | boolean | — | true | | show-message | 是否显示校验错误信息 | boolean | — | true |