progress.wxs 897 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. var STATUS = ['success', 'error', 'warning'];
  2. var STATUS_TEXT = ['success', 'error', 'warning', 'active'];
  3. var PRO_THEME = {
  4. LINE: 'line',
  5. PLUMP: 'plump',
  6. CIRCLE: 'circle',
  7. };
  8. var STATUS_COLOR = {
  9. success: '#00a870',
  10. error: '#e34d59',
  11. warning: '#ed7b2f',
  12. };
  13. var LINE_STATUS_ICON = {
  14. success: 'check-circle-filled',
  15. error: 'error-circle-filled',
  16. warning: 'error-circle-filled',
  17. };
  18. var CIRCLE_STATUS_ICON = {
  19. success: 'check',
  20. error: 'close',
  21. warning: 'error',
  22. };
  23. var getAriaLabel = function (status) {
  24. if (status === 'error') {
  25. return '进度失败';
  26. }
  27. if (status === 'warning') {
  28. return '进度异常';
  29. }
  30. return '';
  31. };
  32. module.exports = {
  33. STATUS: STATUS,
  34. STATUS_TEXT: STATUS_TEXT,
  35. PRO_THEME: PRO_THEME,
  36. STATUS_COLOR: STATUS_COLOR,
  37. LINE_STATUS_ICON: LINE_STATUS_ICON,
  38. CIRCLE_STATUS_ICON: CIRCLE_STATUS_ICON,
  39. getAriaLabel: getAriaLabel,
  40. };