@skit/wepy-com-loading

1.0.0 • Public • Published

wepy-com-loading

一个阻塞页面的加载动画组件。

此组件依赖 wepy 1.7.0+。

如果你正在使用 wepy 2.x,请移步 wepy2-com-loading


用法

安装:

npm install @skit/wepy-com-loading --save

导入:

<template>
    <ui-loading />
</template>
<script>
    import Wepy from 'wepy';
    import UILoading from '@skit/wepy-com-loading';

    export default class DemoPage extends Wepy.page {
        components = {
            'ui-loading': UILoading
        };
    }
</script>

可配置项

属性:

方法:

/**
 * 显示加载对话框。
 * @param {Object} options 配置项。
 * @param {String} options.content 提示文本。
 */
this.$invoke('ui-loading', 'show', {
    content: '加载中'
});

/**
 * 显示加载对话框。
 * @param {String} content 提示文本。
 */
this.$invoke('ui-loading', 'show', '加载中');

/**
 * 隐藏加载对话框。
 */
this.$invoke('ui-loading', 'hide');

/@skit/wepy-com-loading/

    Package Sidebar

    Install

    npm i @skit/wepy-com-loading

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.58 kB

    Total Files

    4

    Last publish

    Collaborators

    • fudiwei