mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 09:20:51 +08:00
4560adfdf8
* refactor(style): adjust component size to large/default/small * refactor(components): avatar size & use flex instead of block * refactor(components): adjust check button size * refactor(components): adjust tag size * refactor(components): adjust size doc * fix(components): datetime-picker demo style width * refactor(components): color-picker size & block to flex * refactor(components): adjust slider input size * refactor(components): adjust radio input size for demo * refactor(components): adjust select size & docs * refactor(components): adjust form radio size & docs * refactor(components): add windicss for docs * refactor(components): adjust skeleton avatar size to css var * refactor(components): simplify typography size demo * refactor(components): adjust dropdown size & demo * refactor(components): adjust descriptions size * fix(components): datetime-picker showcase class pollute global button * chore(ci): upgrade docs dependencies to fix ci * fix(ci): add highlight because vitepress not export it * fix(ci): disable line for no-console * fix(ci): remove mini to fix test * fix(style): code font size * fix(style): button span flex style * fix(style): button padding horizontal default 15px * refactor(components): adjust tag padding size & demo * refactor(components): adjust form line-height for input * refactor(components): adjust dropdown menu size & button padding * fix(style): picker separator block to flex center * fix: dropdown button span items-center * style: adjust input-with-icon & size demo & fix input vitepress load * chore: upgrade dependencies * chore: upgrade dependencies * ci: fix website build * ci: regenerate pnpm-lock.yaml * ci: use dev pnpm-lock * ci: update pnpm-lock.yaml
96 lines
4.6 KiB
Markdown
96 lines
4.6 KiB
Markdown
---
|
|
title: Descriptions
|
|
lang: en-US
|
|
---
|
|
|
|
# Descriptions
|
|
|
|
Display multiple fields in list form.
|
|
|
|
<style lang="scss" scoped>
|
|
.example-showcase {
|
|
.margin-top {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.my-label {
|
|
background: var(--el-color-success-lighter);
|
|
}
|
|
|
|
.my-content {
|
|
background: var(--el-color-danger-lighter);
|
|
}
|
|
}
|
|
</style>
|
|
|
|
## Basic usage
|
|
|
|
:::demo
|
|
|
|
descriptions/basic-usage
|
|
|
|
:::
|
|
|
|
## Sizes
|
|
|
|
:::demo
|
|
|
|
descriptions/sizes
|
|
|
|
:::
|
|
|
|
## Vertical List
|
|
|
|
:::demo
|
|
|
|
descriptions/vertical-list
|
|
|
|
:::
|
|
|
|
## Customized Style
|
|
|
|
:::demo
|
|
|
|
descriptions/customized-style
|
|
|
|
:::
|
|
|
|
## Descriptions Attributes
|
|
|
|
| Attribute | Description | Type | Accepted Values | Default |
|
|
| --------- | ------------------------------------------ | ------- | ----------------------- | ---------- |
|
|
| border | with or without border | boolean | — | false |
|
|
| column | numbers of `Descriptions Item` in one line | number | — | 3 |
|
|
| direction | direction of list | string | vertical / horizontal | horizontal |
|
|
| size | size of list | string | large / default / small | default |
|
|
| title | title text, display on the top left | string | — | — |
|
|
| extra | extra text, display on the top right | string | — | — |
|
|
|
|
## Descriptions Slots
|
|
|
|
| Name | Description | Subtags |
|
|
| ----- | ------------------------------------------- | ----------------- |
|
|
| — | customize default content | Descriptions Item |
|
|
| title | custom title, display on the top left | — |
|
|
| extra | custom extra area, display on the top right | — |
|
|
|
|
## Descriptions Item Attributes
|
|
|
|
| Attribute | Description | Type | Accepted Values | Default |
|
|
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | --------------------- | ------- |
|
|
| label | label text | string | — | — |
|
|
| span | colspan of column | 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 | — | — |
|
|
| align | column content alignment (If no `border`, effective for both label and content) | string | 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) | string | left / center / right | — |
|
|
| class-name | column content custom class name | string | — | — |
|
|
| label-class-name | column label custom class name | string | — | — |
|
|
|
|
## Descriptions Item Slots
|
|
|
|
| Name | Description |
|
|
| ----- | ------------------------- |
|
|
| — | customize default content |
|
|
| label | custom label |
|