跳到主要内容

空态 Empty

空态占位图,常用于加载失败、加载数据为空等场景。

安装使用​

import { TiEmpty } from '@titian-design/mobile-react';

用法示例​

基本用法​

基本用法​

单独使用
codesanbox
copy
code
使用ExtStyle样式
code
codesanbox
copy
code
使用ExtClass样式
code
codesanbox
copy
code
使用标题、副标题
code
codesanbox
copy
code
使用Size
codesanbox
copy
code
使用自定义图片
code
codesanbox
copy
code

TiEmpty API​

属性 Properties​

名称类型必填默认值说明备注
imagestring否https://cdn2.weimob.com/saas/saas-fe-sirius-orion-node/production/145/searchwithnoresult.png图片网址
sizemedium | big否medium尺寸
titlestring否-标题-
subTitlestring否-副标题-
useImageSlotboolean否false是否启用 image 插槽-
useTitleSlotboolean否false是否启用 title 插槽-
extStylestring否-容器样式-

插槽 Slots​

名称说明备注
image自定义图片展示-
title自定义标题块展示-
bottom自定义底部块展示-

外部样式类 External Classes​

名称说明备注
extClass根节点可扩展的类名-

CSS 变量 CSS Variables​

变量默认值说明备注
--empty-medium-size200px中间尺寸下图片大小-
--empty-big-size240px大尺寸下图片大小-
--empty-middle-gaptheme.spacing.vertical.v7标题距离图片的间距(size = 中号 medium)-
theme.spacing.vertical.v8标题距离图片的间距(size = 大号 big)-
--empty-title-colortheme.color.gray.texticon.550标题区文字颜色-
--empty-sub-title-colortheme.color.gray.texticon.250副标题区文字颜色-
--empty-min-width100%最小宽度-
--empty-min-height485px最小高度-
--empty-width100%宽度-
--empty-height100%高度-