更新记录

1.0.0(2020-03-24)

发布组件


平台兼容性

1. 制作原因

其实该插件和官方提供的uni.showLoading()从表现方法和使用方式来说几乎一致。本插件可以替换加载动画。替换方式是修改源文件中的动画GIF图片。

2. 参数

参数 类型 默认值 描述
title String 加载中 加载提示语
hasMask Boolean false 是否需要遮罩层

3. 使用方法

this.$refs.Loading.show() // 打开
this.$refs.Loading.hide() // 关闭

4. 示例代码

<template>
    <view class="content">
        <button type="primary" @tap="openLoading">打开加载动画</button>
        <mi-loading 
            ref="Loading"
            title="3s后关闭"
            hasMask="true"
        ></mi-loading>
    </view>
</template>

<script>
    import miLoading from '../../components/mi-loading/mi-loading.vue'
    export default {
        components: {miLoading},
        methods: {
            openLoading() {
                this.$refs.Loading.show()
                setTimeout(() => {
                    this.$refs.Loading.hide()
                }, 3000)
            }
        }
    }
</script>

5. 更换加载Gif图

gif图下载地址1

gif图下载地址2

隐私、权限声明

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

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

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

许可协议

MIT协议

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