doc(description)

This commit is contained in:
07akioni 2020-01-30 21:41:46 +08:00
parent c1c40c0aa6
commit 58124a671d
3 changed files with 41 additions and 2 deletions

View File

@ -1,5 +1,8 @@
# Descriptions
<!--single-column-->
Display items of content easily.
## Demos
```demo
basic
columns
@ -7,4 +10,33 @@ span
placement
bordered
size
```
```
## Props
### Descriptions Props
|Name|Type|Default|Description|
|-|-|-|-|
|title|`string`|`null`||
|column|`number`|`3`||
|label-placement|`'top' \| 'left'`|`'top`||
|label-align|`'center' \| 'left' \| 'right'`|`'left`||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|bordered|`boolean`|`false`||
### Description Item Props
|Name|Type|Default|Description|
|-|-|-|-|
|label|`string`|`null`||
|span|`number`|`1`||
## Slots
### Descriptions Slots
|Name|Parameters|Description|
|-|-|-|
|default|`()`||
### Description Item Slots
|Name|Parameters|Description|
|-|-|-|
|default|`()`||
|label|`()`||

View File

@ -37,7 +37,7 @@ export default {
labelAlign: {
default: 'left',
validator (value) {
return ['left', 'top'].includes(value)
return ['left', 'right', 'center'].includes(value)
}
},
size: {

View File

@ -57,6 +57,13 @@
@include descriptions-size-mixin('small');
@include descriptions-size-mixin('medium');
@include descriptions-size-mixin('large');
@include m(left-label-placement) {
@include b(descriptions-table-content) {
& > * {
vertical-align: top;
}
}
}
@include m(left-label-align) {
th {
text-align: left;