water_xcx/miniprogram_npm/tdesign-miniprogram/empty
Cc a25b49fd6d 初始化:小程序同步 2025-04-15 15:44:51 +08:00
..
README.md 初始化:小程序同步 2025-04-15 15:44:51 +08:00
empty.d.ts 初始化:小程序同步 2025-04-15 15:44:51 +08:00
empty.js 初始化:小程序同步 2025-04-15 15:44:51 +08:00
empty.json 初始化:小程序同步 2025-04-15 15:44:51 +08:00
empty.wxml 初始化:小程序同步 2025-04-15 15:44:51 +08:00
empty.wxs 初始化:小程序同步 2025-04-15 15:44:51 +08:00
empty.wxss 初始化:小程序同步 2025-04-15 15:44:51 +08:00
props.d.ts 初始化:小程序同步 2025-04-15 15:44:51 +08:00
props.js 初始化:小程序同步 2025-04-15 15:44:51 +08:00
type.d.ts 初始化:小程序同步 2025-04-15 15:44:51 +08:00
type.js 初始化:小程序同步 2025-04-15 15:44:51 +08:00

README.md

title description spline isComponent
Empty 空内容 用于空状态时的占位提示。 data true

引入

全局引入,在 miniprogram 根目录下的app.json中配置,局部引入,在需要引入的页面或组件的index.json中配置。

"usingComponents": {
  "t-empty": "tdesign-miniprogram/empty/empty"
}

代码演示

图标空状态

{{ base }}

自定义图片空状态

{{ imageEmpty }}

带操作空状态

{{ buttonEmpty }}

空页面

{{ pageEmpty }}

API

Empty Props

名称 类型 默认值 说明 必传
action Slot - 操作按钮 N
description String / Slot - 描述文字 N
external-classes Array - 组件类名,分别用于设置 组件外层类名、文本描述类名、图片类名、操作按钮类名。['t-class', 't-class-description', 't-class-image', 't-class-actions'] N
icon String - 图标名称 N
image String / Slot - 图片地址 N