props.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import defProps from '../../libs/config/props.js';
  2. export default {
  3. props: {
  4. // 控制是否出现滚动条,仅nvue有效
  5. showScrollbar: {
  6. type: Boolean,
  7. default: () => defProps.list.showScrollbar
  8. },
  9. // 距底部多少时触发scrolltolower事件
  10. lowerThreshold: {
  11. type: [String, Number],
  12. default: () => defProps.list.lowerThreshold
  13. },
  14. // 距顶部多少时触发scrolltoupper事件,非nvue有效
  15. upperThreshold: {
  16. type: [String, Number],
  17. default: () => defProps.list.upperThreshold
  18. },
  19. // 设置竖向滚动条位置
  20. scrollTop: {
  21. type: [String, Number],
  22. default: () => defProps.list.scrollTop
  23. },
  24. // 控制 onscroll 事件触发的频率,仅nvue有效
  25. offsetAccuracy: {
  26. type: [String, Number],
  27. default: () => defProps.list.offsetAccuracy
  28. },
  29. // 启用 flexbox 布局。开启后,当前节点声明了display: flex就会成为flex container,并作用于其孩子节点,仅微信小程序有效
  30. enableFlex: {
  31. type: Boolean,
  32. default: () => defProps.list.enableFlex
  33. },
  34. // 是否按分页模式显示List,默认值false
  35. pagingEnabled: {
  36. type: Boolean,
  37. default: () => defProps.list.pagingEnabled
  38. },
  39. // 是否允许List滚动
  40. scrollable: {
  41. type: Boolean,
  42. default: () => defProps.list.scrollable
  43. },
  44. // 值应为某子元素id(id不能以数字开头)
  45. scrollIntoView: {
  46. type: String,
  47. default: () => defProps.list.scrollIntoView
  48. },
  49. // 在设置滚动条位置时使用动画过渡
  50. scrollWithAnimation: {
  51. type: Boolean,
  52. default: () => defProps.list.scrollWithAnimation
  53. },
  54. // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只对微信小程序有效
  55. enableBackToTop: {
  56. type: Boolean,
  57. default: () => defProps.list.enableBackToTop
  58. },
  59. // 列表的高度
  60. height: {
  61. type: [String, Number],
  62. default: () => defProps.list.height
  63. },
  64. // 列表宽度
  65. width: {
  66. type: [String, Number],
  67. default: () => defProps.list.width
  68. },
  69. // 列表前后预渲染的屏数,1代表一个屏幕的高度,1.5代表1个半屏幕高度
  70. preLoadScreen: {
  71. type: [String, Number],
  72. default: () => defProps.list.preLoadScreen
  73. },
  74. // 开启自定义下拉刷新
  75. refresherEnabled: {
  76. type: Boolean,
  77. default: () => false
  78. },
  79. // 设置自定义下拉刷新阈值
  80. refresherThreshold: {
  81. type: Number,
  82. default: () => 45
  83. },
  84. // 设置自定义下拉刷新默认样式,支持设置 black,white,none,none 表示不使用默认样式
  85. refresherDefaultStyle: {
  86. type: String,
  87. default: () => 'black'
  88. },
  89. // 设置自定义下拉刷新区域背景颜色
  90. refresherBackground: {
  91. type: String,
  92. default: () => '#FFF'
  93. },
  94. // 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
  95. refresherTriggered: {
  96. type: Boolean,
  97. default: () => false
  98. },
  99. }
  100. }