uni-app 耗时操作时显示加载中提示框

uni-app About 395 words

代码

methods: {
    getInfo() {
        uni.showLoading({
            title: '加载中',
            mask: true
        });
        uni.request({
            url: '/request',
            method: 'POST',
            success: (res) => {
            },
            complete: () => {
                uni.hideLoading();
            }
        });
    }
}

参考文档

https://uniapp.dcloud.net.cn/api/ui/prompt.html

Views: 43 · Posted: 2025-07-28

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh