progress.mjs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
  2. //#region ../../packages/components/progress/src/progress.ts
  3. /**
  4. * @deprecated Removed after 3.0.0, Use `ProgressProps` instead.
  5. */
  6. const progressProps = buildProps({
  7. /**
  8. * @description type of progress bar
  9. */
  10. type: {
  11. type: String,
  12. default: "line",
  13. values: [
  14. "line",
  15. "circle",
  16. "dashboard"
  17. ]
  18. },
  19. /**
  20. * @description percentage, required
  21. */
  22. percentage: {
  23. type: Number,
  24. default: 0,
  25. validator: (val) => val >= 0 && val <= 100
  26. },
  27. /**
  28. * @description the current status of progress bar
  29. */
  30. status: {
  31. type: String,
  32. default: "",
  33. values: [
  34. "",
  35. "success",
  36. "exception",
  37. "warning"
  38. ]
  39. },
  40. /**
  41. * @description set indeterminate progress
  42. */
  43. indeterminate: Boolean,
  44. /**
  45. * @description control the animation duration of indeterminate progress or striped flow progress
  46. */
  47. duration: {
  48. type: Number,
  49. default: 3
  50. },
  51. /**
  52. * @description the width of progress bar
  53. */
  54. strokeWidth: {
  55. type: Number,
  56. default: 6
  57. },
  58. /**
  59. * @description butt/circle/dashboard type shape at the end path
  60. */
  61. strokeLinecap: {
  62. type: definePropType(String),
  63. default: "round"
  64. },
  65. /**
  66. * @description whether to place the percentage inside progress bar, only works when `type` is 'line'
  67. */
  68. textInside: Boolean,
  69. /**
  70. * @description the canvas width of circle progress bar
  71. */
  72. width: {
  73. type: Number,
  74. default: 126
  75. },
  76. /**
  77. * @description whether to show percentage
  78. */
  79. showText: {
  80. type: Boolean,
  81. default: true
  82. },
  83. /**
  84. * @description background color of progress bar. Overrides `status` prop
  85. */
  86. color: {
  87. type: definePropType([
  88. String,
  89. Array,
  90. Function
  91. ]),
  92. default: ""
  93. },
  94. /**
  95. * @description stripe over the progress bar's color
  96. */
  97. striped: Boolean,
  98. /**
  99. * @description get the stripes to flow
  100. */
  101. stripedFlow: Boolean,
  102. /**
  103. * @description custom text format
  104. */
  105. format: {
  106. type: definePropType(Function),
  107. default: (percentage) => `${percentage}%`
  108. }
  109. });
  110. //#endregion
  111. export { progressProps };
  112. //# sourceMappingURL=progress.mjs.map