Empty 空提示
常用于展示页面没有数据或页面加载错误等场景。
平台
| App | 小程序 | H5 |
|---|---|---|
| √ | √ | √ |
属性
| 属性名 | 类型 | 默认值 | 说明 | 平台 |
|---|---|---|---|---|
| img | String,Object | null | 图片 参考c-img组件的props | All |
| desc | String,Object,Array | 没有数据 | 描述 | All |
| descProps | Object | {} | 描述配置 参考c-text组件的props | All |
| error | Boolean | false | 是否错误类型 错误类型会显示一个重试按钮,且会检测网络 | All |
| errorDesc | String,Object,Array | null | 错误描述,为空时使用desc | All |
| errorImg | String,Object | {} | 错误的图片 | All |
| noNetWorkImg | String,Object | {} | 断网的图片 | All |
| retryBtnProps | Object | {} | 重试按钮配置 | All |
| cClass | String,Array,Object | null | 组件类 | All |
| cStyle | String,Array,Object | null | 组件样式 | All |
| margin | String,Number,Array | null | 外边距 | All |
| padding | String,Number,Array | null | 内边距 | All |
| bgColor | String | null | 背景色,支持c-bg-开头的背景色类 | All |
事件
| 事件名 | 说明 | 平台 |
|---|---|---|
| retry | 重试按钮点击 |
插槽
| 插槽名 | 说明 |
|---|---|
| img | 图片插槽 |
| default | 提示文字下插槽 |
| btn | 重试按钮插槽 |
示例
vue
<template>
<c-empty />
</template>1
2
3
2
3
