2018-03-09 05:26:34 +00:00
|
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
|
|
### Card
|
|
|
|
|
|
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|
|
| --- | --- | --- | --- |
|
2018-09-05 13:28:54 +00:00
|
|
|
|
| actions | 卡片操作组,位置在卡片底部 |slots | - |
|
|
|
|
|
| activeTabKey | 当前激活页签的 key | string | - |
|
|
|
|
|
| headStyle | 自定义标题区域样式 | object | - |
|
2018-03-09 05:26:34 +00:00
|
|
|
|
| bodyStyle | 内容区域自定义样式 | object | - |
|
|
|
|
|
| bordered | 是否有边框 | boolean | true |
|
2018-07-17 13:27:06 +00:00
|
|
|
|
| cover | 卡片封面 | slot | - |
|
2018-09-05 13:28:54 +00:00
|
|
|
|
| defaultActiveTabKey | 初始化选中页签的 key,如果没有设置 activeTabKey | string | 第一个页签 |
|
2018-03-09 09:50:33 +00:00
|
|
|
|
| extra | 卡片右上角的操作区域 | string\|slot | - |
|
2018-03-09 05:26:34 +00:00
|
|
|
|
| hoverable | 鼠标移过时可浮起 | boolean | false |
|
|
|
|
|
| loading | 当卡片内容还在加载中时,可以用 loading 展示一个占位 | boolean | false |
|
2018-07-17 14:04:32 +00:00
|
|
|
|
| tabList | 页签标题列表, 可以通过scopedSlots属性自定义tab | Array<{key: string, tab: any, scopedSlots: {tab: 'XXX'}}> | - |
|
2019-03-13 13:32:14 +00:00
|
|
|
|
| size | card 的尺寸 | `default` \| `small` | `default` |
|
2018-07-17 13:27:06 +00:00
|
|
|
|
| title | 卡片标题 | string\|slot | - |
|
2018-03-09 05:26:34 +00:00
|
|
|
|
| type | 卡片类型,可设置为 `inner` 或 不设置 | string | - |
|
|
|
|
|
|
2018-07-27 07:30:24 +00:00
|
|
|
|
### 事件
|
|
|
|
|
| 事件名称 | 说明 | 回调参数 |
|
|
|
|
|
| --- | --- | --- |
|
|
|
|
|
| tabChange | 页签切换的回调 | (key) => void | - |
|
2018-03-09 05:26:34 +00:00
|
|
|
|
|
2018-07-27 07:30:24 +00:00
|
|
|
|
### Card.Grid
|
2018-03-09 05:26:34 +00:00
|
|
|
|
|
|
|
|
|
### Card.Meta
|
|
|
|
|
|
|
|
|
|
| Property | Description | Type | Default |
|
|
|
|
|
| -------- | ----------- | ---- | ------- |
|
2018-07-17 13:27:06 +00:00
|
|
|
|
| avatar | 头像/图标 | slot | - |
|
2018-07-27 07:30:24 +00:00
|
|
|
|
| description | 描述内容 | string\|slot | - |
|
|
|
|
|
| title | 标题内容 | string\|slot | - |
|