TUI

0.3.7
Empty 空缺内容
用于项目中通用的空缺内容填充展示
基础用法
默认空缺文案展示、自定义空缺图标
暂无数据
示例代码
vue
<template>
  <TsEmpty></TsEmpty>
</template>
基础用法
默认空缺文案展示、自定义空缺图标
自定义空缺文案
示例代码
vue
<template>
  <TsEmpty text-center text="自定义空缺文案"></TsEmpty>
</template>
自定义插槽
可以通过插槽进行自定义空缺内容展示
自定义插槽空缺内容
示例代码
vue
<template>
  <TsEmpty>
    <div style="display: flex;flex-direction: column; align-items: center; row-gap: 12px;margin: auto;">
      <TsImage shape="square"></TsImage>
      <div>自定义空缺内容</div>
    </div>
  </TsEmpty>
</template>
属性 Props
属性名
说明
类型
可选值
默认值
版本说明
text
空缺文案
String
-
暂无数据
center
是否强制居中
Boolean, null, String
-
null
插槽 Slots
插槽名
说明
default
自定义的插槽内容, 会覆盖 text 属性