props.js 1.8 KB

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