You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8 KiB

9 months ago
  1. export default {
  2. props: {
  3. // 开始的数值,默认从0增长到某一个数
  4. startVal: {
  5. type: [String, Number],
  6. default: uni.$u.props.countTo.startVal
  7. },
  8. // 要滚动的目标数值,必须
  9. endVal: {
  10. type: [String, Number],
  11. default: uni.$u.props.countTo.endVal
  12. },
  13. // 滚动到目标数值的动画持续时间,单位为毫秒(ms)
  14. duration: {
  15. type: [String, Number],
  16. default: uni.$u.props.countTo.duration
  17. },
  18. // 设置数值后是否自动开始滚动
  19. autoplay: {
  20. type: Boolean,
  21. default: uni.$u.props.countTo.autoplay
  22. },
  23. // 要显示的小数位数
  24. decimals: {
  25. type: [String, Number],
  26. default: uni.$u.props.countTo.decimals
  27. },
  28. // 是否在即将到达目标数值的时候,使用缓慢滚动的效果
  29. useEasing: {
  30. type: Boolean,
  31. default: uni.$u.props.countTo.useEasing
  32. },
  33. // 十进制分割
  34. decimal: {
  35. type: [String, Number],
  36. default: uni.$u.props.countTo.decimal
  37. },
  38. // 字体颜色
  39. color: {
  40. type: String,
  41. default: uni.$u.props.countTo.color
  42. },
  43. // 字体大小
  44. fontSize: {
  45. type: [String, Number],
  46. default: uni.$u.props.countTo.fontSize
  47. },
  48. // 是否加粗字体
  49. bold: {
  50. type: Boolean,
  51. default: uni.$u.props.countTo.bold
  52. },
  53. // 千位分隔符,类似金额的分割(¥23,321.05中的",")
  54. separator: {
  55. type: String,
  56. default: uni.$u.props.countTo.separator
  57. }
  58. }
  59. }