Skip to content

Empty State 空状态

Empty State 空状态打开
9:41
/pages/empty-state/index

介绍

weui-empty-state 用于无数据、无权限、加载失败等空页面场景,可配置图标、标题、描述和操作按钮。

基础用法

vue
<weui-empty-state
  title="暂无内容"
  desc="当前列表还没有任何数据"
  :actions="[{ text: '刷新' }]"
/>

自定义图标

vue
<weui-empty-state title="搜索无结果">
  <template #icon>
    <weui-icon type="info-circle" size="msg-primary" />
  </template>
</weui-empty-state>

Props

属性说明类型默认值
icon图标 classstring'weui-icon-info-circle'
title标题string'暂无内容'
desc描述string''
actions操作按钮数组,支持 { text, type, disabled }array[]

Slots

插槽名说明
icon自定义图标
title自定义标题
desc自定义描述
actions自定义操作区
extra额外内容

Events

事件名说明回调参数
action-click点击默认操作按钮action, index

Released under the MIT License.