当前位置:   article > 正文

uni-app 提示框_uniapp icon?: string;

uniapp icon?: string;

uni-app官网提供的两种显示方式:

第一种

uni.showToast

  1. /*
  2. title {string} 提示的内容,长度与 icon 取值有关。
  3. icon {string} 图标
  4. image {string} 自定义图标的本地路径
  5. mask {boolean} 遮罩层
  6. duration {number} 持续时间 默认1500
  7. position {string} 显示位置 'top','center','bottom'
  8. success {function} 成功的回调
  9. fail {function} 失败的回调
  10. complete {function} 结束的回调
  11. */
  12. uni.showToast({
  13. title: '标题',
  14. duration: 2000
  15. });
  16. uni.hideToast(); //隐藏提示框

第二种

uni.showModal

  1. /*
  2. title {string} 提示的标题
  3. content {string} 提示的内容
  4. showCancel {boolean} 是否显示关闭按钮 true
  5. cancelText {string} 取消按钮的文字,"取消",最多四个字符
  6. cancelColor {HexColor} 取消按钮的文字颜色
  7. confirmText {string} 确认按钮的文字,"取消",最多四个字符
  8. confirmColor {HexColor} 确认按钮的文字颜色
  9. success {fu
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/985626
推荐阅读
相关标签
  

闽ICP备14008679号