uni-app官网提供的两种显示方式:
第一种
uni.showToast
/*
title {string} 提示的内容,长度与 icon 取值有关。
icon {string} 图标
image {string} 自定义图标的本地路径
mask {boolean} 遮罩层
duration {number} 持续时间 默认1500
position {string} 显示位置 'top','center','bottom'
success {function} 成功的回调
fail {function} 失败的回调
complete {function} 结束的回调
*/
uni.showToast({
title: '标题',
duration: 2000
});
uni.hideToast(); //隐藏提示框
第二种
uni.showModal
/*
title {string} 提示的标题
content {string} 提示的内容
showCancel {boolean} 是否显示关闭按钮 true
cancelText {string} 取消按钮的文字,"取消",最多四个字符
cancelColor {HexColor} 取消按钮的文字颜色
confirmText {string} 确认按钮的文字,"取消",最多四个字符
confirmColor {HexColor} 确认按钮的文字颜色
success {fu