Empty 空状态

空状态时的占位提示。

基础用法

description

自定义图片

通过设置 image 属性传入图片 URL。

暂无数据

图片尺寸

通过使用 image-size 属性来控制图片大小。

暂无数据

底部内容

使用默认插槽可在底部插入内容。

暂无数据

自定义样式

您可以为empty组件设置自定义样式。 使用 css/scss 语言来更改全局或局部颜色。 我们设置了一些全局颜色变量:--elp-empty-fill-color-0--elp-empty-fill-color-1--elp-empty-fill-color-2、……、--elp-empty-fill-color-9。 您可以使用类似 :root { --elp-empty-fill-color-0: red; --elp-empty-fill-color-1: blue; } 等变量。 但通常,如果你想要更改样式,你需要更改所有颜色,因为这些颜色是一个组合。

默认变量

变量颜色
--elp-empty-fill-color-0var(--elp-color-white)
--elp-empty-fill-color-1#fcfcfd
--elp-empty-fill-color-2#f8f9fb
--elp-empty-fill-color-3#f7f8fc
--elp-empty-fill-color-4#eeeff3
--elp-empty-fill-color-5#edeef2
--elp-empty-fill-color-6#e9ebef
--elp-empty-fill-color-7#e5e7e9
--elp-empty-fill-color-8#e0e3e9
--elp-empty-fill-color-9#d5d7de

API

Attributes

属性名说明类型默认值
imageempty 组件的图像地址string''
image-sizeempty 组件的图像尺寸(宽度)number
descriptionempty 组件的描述信息string''

插槽

插槽名描述说明
default作为底部内容的内容
image作为图像的内容
description作为描述的内容

源代码

组件样式文档

贡献者