更新记录
1.0.0.2(2025-12-30)
下载此版本
x
1.0.0.1(2025-12-30)
下载此版本
master
1.0.0(2025-12-30)
下载此版本
master
查看更多
平台兼容性
uni-app(4.45)
| Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
| √ |
√ |
√ |
√ |
√ |
√ |
√ |
√ |
√ |
| 微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
| √ |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
其他
安装
在市场导入xf-emptyuni_modules版本的即可,无需import
组件关联说明
插件使用
- 位于 uni_modules/xf-empty/components/xf-empty
- 导入插件后直接使用
<xf-empty />
基本用法
<template>
<view class="xf-col">
<text>Empty 空状态</text>
<xf-empty iconName="blank" text="暂无数据"></xf-empty>
<text>有按钮文字状态</text>
<xf-empty iconName="blankSearch" text="暂无数据" btnText="添加数据" @handleClick="handleClick"></xf-empty>
<text>搜索后选择</text>
<xf-empty iconName="blankSearch" text="请搜索后选择"></xf-empty>
<text>纯文字</text>
<xf-empty text="暂无数据"></xf-empty>
<text>网络错误</text>
<xf-empty iconName="netError" text="网络异常" btnText="点击刷新" @handleClick="handleClick"></xf-empty>
</view>
</template>
<script setup lang="ts">
import { showToast } from '../../../uni_modules/xf-ts/common';
function handleClick() {
showToast("xxxxx")
}
</script>
API
Props
| 属性名 |
说明 |
类型 |
默认值 |
| customStyle |
自定义style |
object|string |
- |
| customClass |
自定义class |
string |
- |
| iconName |
空状态背景图片名参考static-assets文件中的IconPaths |
string |
- |
| text |
提示文字 |
string |
- |
| btnText |
点击按钮文字 |
string |
- |
事件 Emits
| 事件名 |
说明 |
返回值 |
| handleClick |
点击文字按钮事件 |
|