1、成功提示框
提交表单的时候,提交成功弹出的提示框。
uni.showToast({
title: '提交成功',
duration: 2000
});
2、加载框
uni.showLoading({
title: '加载中'
});
setTimeout(function () {
uni.hideLoading();
}, 2000);
3、去掉图标,只显示文字提示框
uni.showToast({
title: '请填写员工工号',
icon:'none',
duration: 2000
});
4、模态弹窗
uni.showModal({
title: '提示',
content: '这是一个模态弹窗',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
转载:https://blog.csdn.net/gongxifacai_believe/article/details/108950967
查看评论