props.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import { defineProps } from '../../libs/util/props';
  2. export default defineProps('loadmore', {
  3. // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  4. status: {
  5. type: String,
  6. default: 'loadmore'
  7. },
  8. // 组件背景色
  9. bgColor: {
  10. type: String,
  11. default: 'transparent'
  12. },
  13. // 是否显示加载中的图标
  14. icon: {
  15. type: Boolean,
  16. default: true
  17. },
  18. // 字体大小
  19. fontSize: {
  20. type: [String, Number],
  21. default: 14
  22. },
  23. // 图标大小
  24. iconSize: {
  25. type: [String, Number],
  26. default: 17
  27. },
  28. // 字体颜色
  29. color: {
  30. type: String,
  31. default: '#606266'
  32. },
  33. // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
  34. loadingIcon: {
  35. type: String,
  36. default: 'spinner'
  37. },
  38. // 加载前的提示语
  39. loadmoreText: {
  40. type: String,
  41. default: () => uni.$u.$t('uLoadmore.loadmoreText')
  42. },
  43. // 加载中提示语
  44. loadingText: {
  45. type: String,
  46. default: () => uni.$u.$t('uLoadmore.loadingText')
  47. },
  48. // 没有更多的提示语
  49. nomoreText: {
  50. type: String,
  51. default: () => uni.$u.$t('uLoadmore.nomoreText')
  52. },
  53. // 在"没有更多"状态下,是否显示粗点
  54. isDot: {
  55. type: Boolean,
  56. default: false
  57. },
  58. // 加载中图标的颜色
  59. iconColor: {
  60. type: String,
  61. default: '#b7b7b7'
  62. },
  63. // 上边距
  64. marginTop: {
  65. type: [String, Number],
  66. default: 10
  67. },
  68. // 下边距
  69. marginBottom: {
  70. type: [String, Number],
  71. default: 10
  72. },
  73. // 高度,单位px
  74. height: {
  75. type: [String, Number],
  76. default: 'auto'
  77. },
  78. // 是否显示左边分割线
  79. line: {
  80. type: Boolean,
  81. default: false
  82. },
  83. // 线条颜色
  84. lineColor: {
  85. type: String,
  86. default: '#E6E8EB'
  87. },
  88. // 是否虚线,true-虚线,false-实线
  89. dashed: {
  90. type: Boolean,
  91. default: false
  92. }
  93. })