uniapp自带的提示窗口

uniapp自带的提示方式

一、显示消息提示窗口

uni.showToast({
    title:"标题"//标题
    duration:2000          //显示时间
})

二、加载提示窗口

显示加载中
uni.showLoading({
    title:"加载中"
})
隐藏加载中
uni.hideLoading()

三、拟态确认框

uni.showModal({
    title:"",
    content:"",
    success:function(res){
        if(res.confirm){
        //用户点击确认按钮触发
        }else if(res.cancel){
        //用户点击取消按钮触发
        }
    }
})

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

posted @ 2023-04-26 10:33  web格调  阅读(292)  评论(0编辑  收藏  举报