更新记录

1.0(2023-08-17)

上线


平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
app-vue app-nvue
钉钉小程序 快手小程序 飞书小程序 京东小程序
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari

red-empty 暂无数据 缺省页 空白数据 占位提示组件

描述

Empty 简单易用 暂无数据 缺省页 空白数据 占位提示组件

使用方法

<template>
    <view>
        <view class="title">基本用法</view>
        <red-empty />
        <view class="title">自定义背景色</view>
        <red-empty img="empty" bg="#f6f7f8" text="内容整理中.." />
        <view class="title">自定义大小</view>
        <red-empty img="search"  text="无搜索记录" imgSize="200" />
        <view class="title">自定义插槽内容</view>
        <red-empty img="network" text="网络中断" >
            <button type="primary" size="mini">自定义按钮</button>
        </red-empty>
        <view class="title">自定义图片</view>
        <!-- #ifndef MP -->
        <red-empty img="./static/icon.png" imgSize="180" text="自定义图片" height="50vh" />
        <!-- #endif -->
        <!-- #ifdef MP -->
        <red-empty img="https://****.jpg" imgSize="180" text="小程序需绝对路径" />
        <!-- #endif -->
    </view>
</template>

<style lang="scss">
    .title{
        padding: 20rpx 0 10rpx 20rpx;
    }
</style>

API

oEmpty Props

属性名 类型 默认值 可选值 说明
img String - network、search、error 缺省图片,支持自定义图片,仅支持jpg/png/svg三种格式
imgSize String 320rpx rpx,px,rem,em,vw,% 缺省图片大小,默认单位rpx
text String 暂无数据 缺省图下方描述文字
bg String #fff transparent 组件背景,style模式
height String 480rpx rpx,px,rem,em,vw,vh,% 占位高度,style模式,支持calc()公式,默认单位rpx

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问