mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
refactor(description): clean code
This commit is contained in:
parent
42477a21e6
commit
548552d798
@ -15,7 +15,7 @@ bordered
|
||||
size
|
||||
```
|
||||
|
||||
## Props
|
||||
## API
|
||||
|
||||
### Descriptions Props
|
||||
|
||||
@ -30,7 +30,7 @@ size
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Size of the description. |
|
||||
| title | `string` | `undefined` | Title of the description. |
|
||||
|
||||
### Description Item Props
|
||||
### DescriptionItem Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
@ -39,8 +39,6 @@ size
|
||||
| label-style | `Object \| string` | `undefined` | Style of the item label. |
|
||||
| span | `number` | `1` | Column span of the item. |
|
||||
|
||||
## Slots
|
||||
|
||||
### Descriptions Slots
|
||||
|
||||
| Name | Parameters | Description |
|
||||
@ -48,7 +46,7 @@ size
|
||||
| default | `()` | Content. |
|
||||
| header | `()` | Header content. |
|
||||
|
||||
### Description Item Slots
|
||||
### DescriptionItem Slots
|
||||
|
||||
| Name | Parameters | Description |
|
||||
| ------- | ---------- | ------------- |
|
||||
|
@ -15,7 +15,7 @@ bordered
|
||||
size
|
||||
```
|
||||
|
||||
## Props
|
||||
## API
|
||||
|
||||
### Descriptions Props
|
||||
|
||||
@ -30,7 +30,7 @@ size
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | 尺寸 |
|
||||
| title | `string` | `undefined` | 标题 |
|
||||
|
||||
### Description Item Props
|
||||
### DescriptionItem Props
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| ------------- | ------------------ | ----------- | --------------- |
|
||||
@ -39,8 +39,6 @@ size
|
||||
| label-style | `Object \| string` | `undefined` | label 的样式 |
|
||||
| span | `number` | `1` | 所占的单元格数 |
|
||||
|
||||
## Slots
|
||||
|
||||
### Descriptions Slots
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
@ -48,7 +46,7 @@ size
|
||||
| default | `()` | 描述的内容 |
|
||||
| header | `()` | header 内容 |
|
||||
|
||||
### Description Item Slots
|
||||
### DescriptionItem Slots
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ---- | ------------------- |
|
||||
|
@ -29,10 +29,7 @@ const descriptionProps = {
|
||||
type: Number,
|
||||
default: 3
|
||||
},
|
||||
columns: {
|
||||
type: Number,
|
||||
default: undefined
|
||||
},
|
||||
columns: Number,
|
||||
labelPlacement: {
|
||||
type: String as PropType<'left' | 'top'>,
|
||||
default: 'top'
|
||||
@ -45,10 +42,7 @@ const descriptionProps = {
|
||||
type: String as PropType<'small' | 'medium' | 'large'>,
|
||||
default: 'medium'
|
||||
},
|
||||
bordered: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bordered: Boolean,
|
||||
labelStyle: [Object, String] as PropType<string | CSSProperties>,
|
||||
contentStyle: [Object, String] as PropType<string | CSSProperties>
|
||||
} as const
|
||||
|
Loading…
Reference in New Issue
Block a user