Skip to content

Commit

Permalink
docs: improved documentation for el-form (#12635)
Browse files Browse the repository at this point in the history
* 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:

#8477

Thanks!

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

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

* Update form.md
  • Loading branch information
kaveet authored and ziyoung committed Sep 14, 2018
1 parent 9f345d8 commit 0bc07d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/docs/en-US/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ All components in a Form inherit their `size` attribute from that Form. Similarl
| model| data of form component | object |||
| rules | validation rules of form | object |||
| 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-suffix | suffix of the label | string |||
| show-message | whether to show the error message | boolean || true |
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/es/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ Todos los componentes de un formulario heredan su atributo `size`. De manera sim
| model | Datos del componente | object |||
| rules | Reglas de validación | object |||
| 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-suffix | sufijo de la etiqueta | string |||
| show-message | si mostrar o no el mensaje de error | boolean || true |
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/zh-CN/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.h
| model | 表单数据对象 | object |||
| rules | 表单验证规则 | object |||
| 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-suffix | 表单域标签的后缀 | string |||
| show-message | 是否显示校验错误信息 | boolean || true |
Expand Down

0 comments on commit 0bc07d7

Please sign in to comment.