mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-02-23 13:31:06 +08:00
refactor(card): tag prop
This commit is contained in:
parent
11d5acc76b
commit
0d343d5707
@ -2,6 +2,10 @@
|
||||
|
||||
## NEXT_VERSION
|
||||
|
||||
### Feats
|
||||
|
||||
- `n-card` 新增 `tag` 属性
|
||||
|
||||
### Fixes
|
||||
|
||||
- 修复 `n-image` 的预览工具栏报错,关闭 [#4157](https://github.com/tusen-ai/naive-ui/issues/4157)
|
||||
|
@ -35,7 +35,7 @@ embedded.vue
|
||||
| hoverable | `boolean` | `false` | Whether to show shadow when hovering on the card. | |
|
||||
| segmented | `boolean \| { [part in 'content' \| 'footer' \| 'action']?: boolean \| 'soft' }` | `false` | Segment divider settings of the card. | |
|
||||
| size | `'small' \| 'medium' \| 'large' \| 'huge'` | `'medium'` | Card size. | |
|
||||
| tag | `string` | `'button'` | What tag need the card be rendered as. | |
|
||||
| tag | `string` | `'div'` | What tag need the card be rendered as. | NEXT_VERSION |
|
||||
| title | `string` | `undefined` | Card title. | |
|
||||
| on-close | `() => void` | `undefined` | Callback function triggered upon closing the card. | |
|
||||
|
||||
|
@ -37,6 +37,7 @@ embedded-debug.vue
|
||||
| hoverable | `boolean` | `false` | 卡片是否可悬浮 | |
|
||||
| segmented | `boolean \| { [part in 'content' \| 'footer' \| 'action']?: boolean \| 'soft' }` | `false` | 卡片的分段区域设置 | |
|
||||
| size | `'small' \| 'medium' \| 'large' \| 'huge'` | `'medium'` | 卡片的尺寸 | |
|
||||
| tag | `string` | `'div'` | 卡片组件要渲染为什么标签 | NEXT_VERSION |
|
||||
| title | `string` | `undefined` | 卡片的标题 | |
|
||||
| on-close | `() => void` | `undefined` | 点击卡片关闭图标时的回调 | |
|
||||
|
||||
|
@ -35,10 +35,7 @@ export const cardBaseProps = {
|
||||
type: Boolean,
|
||||
default: true as boolean
|
||||
},
|
||||
closable: {
|
||||
type: Boolean,
|
||||
default: false as boolean
|
||||
},
|
||||
closable: Boolean,
|
||||
hoverable: Boolean,
|
||||
role: String,
|
||||
onClose: [Function, Array] as PropType<MaybeArray<() => void>>,
|
||||
|
Loading…
Reference in New Issue
Block a user