ant-design/components/empty/index.zh-CN.md
thinkasany 9fcce8ffdc
Some checks are pending
Publish Any Commit / build (push) Waiting to run
🔀 Sync mirror to Gitee / mirror (push) Waiting to run
✅ test / lint (push) Waiting to run
✅ test / test-react-legacy (16, 1/2) (push) Waiting to run
✅ test / test-react-legacy (16, 2/2) (push) Waiting to run
✅ test / test-react-legacy (17, 1/2) (push) Waiting to run
✅ test / test-react-legacy (17, 2/2) (push) Waiting to run
✅ test / test-node (push) Waiting to run
✅ test / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test / test-coverage (push) Blocked by required conditions
✅ test / build (push) Waiting to run
✅ test / test lib/es module (es, 1/2) (push) Waiting to run
✅ test / test lib/es module (es, 2/2) (push) Waiting to run
✅ test / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run
feat: ConfigProvider support classNames and styles for Empty (#52208)
* feat: ConfigProvider support classNames and styles for Empty

* fix

* fix
2025-01-03 14:48:16 +08:00

2.1 KiB
Raw Blame History

category group title subtitle description cover coverDark
Components 数据展示 Empty 空状态 空状态时的展示占位图。 https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*ZdiZSLzEV0wAAAAAAAAAAAAADrJ8AQ/original https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*obM7S5lIxeMAAAAAAAAAAAAADrJ8AQ/original

何时使用

  • 当目前没有数据时,用于显式的用户提示。
  • 初始化场景时的引导创建流程。

代码演示

基本 选择图片 自定义 全局化配置 无描述

API

通用属性参考:通用属性

<Empty>
  <Button>创建</Button>
</Empty>
参数 说明 类型 默认值 版本
description 自定义描述内容 ReactNode -
image 设置显示图片,为 string 时表示自定义图片地址。 ReactNode Empty.PRESENTED_IMAGE_DEFAULT
imageStyle 图片样式 CSSProperties -

内置图片

  • Empty.PRESENTED_IMAGE_SIMPLE

  • Empty.PRESENTED_IMAGE_DEFAULT

Semantic DOM

主题变量Design Token