mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(utils): [addUnit] handle 0 value correctly (#22808)
* fix(utils): [addUnit] handle 0 value correctly * fix: provide example * fix: update * fix: update * test: update case name * fix: update Co-authored-by: Dsaquel <291874700n@gmail.com> * fix: update Co-authored-by: btea <2356281422@qq.com> --------- Co-authored-by: Dsaquel <291874700n@gmail.com> Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
@@ -59,7 +59,7 @@ descriptions/customized-style
|
||||
| size | size of list | ^[enum]`'' \| 'large' \| 'default' \| 'small'` | — |
|
||||
| title | title text, display on the top left | ^[string] | '' |
|
||||
| extra | extra text, display on the top right | ^[string] | '' |
|
||||
| label-width ^(2.8.8) | label width of every column | ^[string] / ^[number] | '' |
|
||||
| label-width ^(2.8.8) | label width of every column | ^[string] / ^[number] | — |
|
||||
|
||||
### Descriptions Slots
|
||||
|
||||
@@ -80,7 +80,7 @@ descriptions/customized-style
|
||||
| rowspan ^(2.8.1) | the number of rows a cell should span | ^[number] | 1 |
|
||||
| width | column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content) | ^[string] / ^[number] | '' |
|
||||
| min-width | column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content) | ^[string] / ^[number] | '' |
|
||||
| label-width ^(2.8.8) | column label width, if not set, it will be the same as the width of the column. Higher priority than the `label-width` of `Descriptions` | ^[string] / ^[number] | '' |
|
||||
| label-width ^(2.8.8) | column label width, if not set, it will be the same as the width of the column. Higher priority than the `label-width` of `Descriptions` | ^[string] / ^[number] | — |
|
||||
| align | column content alignment (If no `border`, effective for both label and content) | ^[enum]`'left' \| 'center' \| 'right'` | left |
|
||||
| label-align | column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute) | ^[enum]`'left' \| 'center' \| 'right'` | — |
|
||||
| class-name | column content custom class name | ^[string] | '' |
|
||||
|
||||
@@ -179,7 +179,7 @@ form/accessibility
|
||||
| prop | A key of `model`. It could be a path of the property (e.g `a.b.0` or `['a', 'b', '0']`). In the use of `validate` and `resetFields` method, the attribute is required. | ^[string] / ^[string[]] | — |
|
||||
| label | Label text. | ^[string] | — |
|
||||
| label-position ^(2.7.7) | Position of item label. If set to `'left'` or `'right'`, `label-width` prop is also required. Default extend `label-position` of `form`. | ^[enum]`'left' \| 'right' \| 'top'` | '' |
|
||||
| label-width | Width of label, e.g. `'50px'`. `'auto'` is supported. | ^[string] / ^[number] | '' |
|
||||
| label-width | Width of label, e.g. `'50px'`. `'auto'` is supported. | ^[string] / ^[number] | — |
|
||||
| required | Whether the field is required or not, will be determined by validation rules if omitted. | ^[boolean] | — |
|
||||
| rules | Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator). | ^[object]`Arrayable<FormItemRule>` | — |
|
||||
| error | Field error message, set its value and the field will validate error and show this message immediately. | ^[string] | — |
|
||||
|
||||
Reference in New Issue
Block a user