20 changed files with 182 additions and 36 deletions
@ -0,0 +1,33 @@ |
|||
--- |
|||
title: DescriptionList |
|||
cols: 1 |
|||
order: 4 |
|||
--- |
|||
|
|||
Groups display multiple read-only fields, which are common to informational displays on detail pages. |
|||
|
|||
## API |
|||
|
|||
### DescriptionList |
|||
|
|||
| Property | Description | Type | Default | |
|||
|----------|------------------------------------------|-------------|---------| |
|||
| layout | type of layout | Enum{'horizontal', 'vertical'} | 'horizontal' | |
|||
| col | specify the maximum number of columns to display, the final columns number is determined by col setting combined with [Responsive Rules](/components/DescriptionList#Responsive-Rules) | number(0 < col <= 4) | 3 | |
|||
| title | title | ReactNode | - | |
|||
| gutter | specify the distance between two items, unit is `px` | number | 32 | |
|||
| size | size of list | Enum{'large', 'small'} | - | |
|||
|
|||
#### Responsive Rules |
|||
|
|||
| Window Width | Columns Number | |
|||
|---------------------|---------------------------------------------| |
|||
| `≥768px` | `col` | |
|||
| `≥576px` | `col < 2 ? col : 2` | |
|||
| `<576px` | `1` | |
|||
|
|||
### DescriptionList.Description |
|||
|
|||
| Property | Description | Type | Default | |
|||
|----------|------------------------------------------|-------------|-------| |
|||
| term | item title | ReactNode | - | |
|||
@ -0,0 +1,15 @@ |
|||
--- |
|||
title: Ellipsis |
|||
cols: 1 |
|||
order: 10 |
|||
--- |
|||
|
|||
When the text is too long, the Ellipsis automatically shortens it according to its length or the maximum number of lines. |
|||
|
|||
## API |
|||
|
|||
Property | Description | Type | Default |
|||
----|------|-----|------ |
|||
tooltip | tooltip for showing the full text content when hovering over | boolean | - |
|||
length | maximum number of characters in the text before being truncated | number | - |
|||
lines | maximum number of rows in the text before being truncated | number | `1` |
|||
@ -1,7 +1,5 @@ |
|||
--- |
|||
title: |
|||
en-US: Ellipsis |
|||
zh-CN: Ellipsis |
|||
title: Ellipsis |
|||
subtitle: 文本自动省略号 |
|||
cols: 1 |
|||
order: 10 |
|||
@ -0,0 +1,18 @@ |
|||
--- |
|||
title: Exception |
|||
cols: 1 |
|||
order: 5 |
|||
--- |
|||
|
|||
Exceptions page is used to provide feedback on specific abnormal state. Usually, it contains an explanation of the error status, and provides users with suggestions or operations, to prevent users from feeling lost and confused. |
|||
|
|||
## API |
|||
|
|||
Property | Description | Type | Default |
|||
---------|-------------|------|-------- |
|||
type | type of exception, the corresponding default `title`, `desc`, `img` will be given if set, which can be overridden by explicit setting of `title`, `desc`, `img` | Enum {'403', '404', '500'} | - |
|||
title | title | ReactNode | - |
|||
desc | supplementary description | ReactNode | - |
|||
img | the url of background image | string | - |
|||
actions | suggested operations, a default 'Home' link will show if not set | ReactNode | - |
|||
linkElement | to specify the element of link | string\|ReactElement | 'a' |
|||
@ -0,0 +1,19 @@ |
|||
--- |
|||
title: NumberInfo |
|||
cols: 1 |
|||
order: 10 |
|||
--- |
|||
|
|||
Often used in data cards for highlighting the business data. |
|||
|
|||
## API |
|||
|
|||
Property | Description | Type | Default |
|||
----|------|-----|------ |
|||
title | title | ReactNode\|string | - |
|||
subTitle | subtitle | ReactNode\|string | - |
|||
total | total amount | ReactNode\|string | - |
|||
subTotal | total amount of additional information | ReactNode\|string | - |
|||
status | increase state | 'up \| down' | - |
|||
theme | state style | string | 'light' |
|||
gap | set the spacing (pixels) between numbers and descriptions | number | 8 |
|||
Loading…
Reference in new issue