message.js 423 B

123456789101112131415161718192021222324252627
  1. export default {
  2. showToast(title, success) {
  3. uni.showToast({
  4. mask: true,
  5. title: title,
  6. duration: 2000,
  7. icon: success || 'none'
  8. });
  9. },
  10. showLoading(title) {
  11. uni.showLoading({
  12. title: title || '加载中...',
  13. mask: true
  14. });
  15. },
  16. hideLoading() {
  17. uni.hideLoading();
  18. },
  19. showTips(el, {title, type}) {
  20. el.show({
  21. title: title,
  22. type: type || 'success',
  23. duration: '2000'
  24. })
  25. }
  26. }