props.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import defprops from '../../libs/config/props';
  2. export default {
  3. props: {
  4. // 是否展示picker弹窗
  5. show: {
  6. type: Boolean,
  7. default: defprops.picker.show
  8. },
  9. // 弹出的方向,可选值为 top bottom right left center
  10. popupMode: {
  11. type: String,
  12. default: defprops.picker.popupMode
  13. },
  14. // 是否展示顶部的操作栏
  15. showToolbar: {
  16. type: Boolean,
  17. default: defprops.picker.showToolbar
  18. },
  19. // 顶部标题
  20. title: {
  21. type: String,
  22. default: defprops.picker.title
  23. },
  24. // 对象数组,设置每一列的数据
  25. columns: {
  26. type: Array,
  27. default: defprops.picker.columns
  28. },
  29. // 是否显示加载中状态
  30. loading: {
  31. type: Boolean,
  32. default: defprops.picker.loading
  33. },
  34. // 各列中,单个选项的高度
  35. itemHeight: {
  36. type: [String, Number],
  37. default: defprops.picker.itemHeight
  38. },
  39. // 取消按钮的文字
  40. cancelText: {
  41. type: String,
  42. default: defprops.picker.cancelText
  43. },
  44. // 确认按钮的文字
  45. confirmText: {
  46. type: String,
  47. default: defprops.picker.confirmText
  48. },
  49. // 取消按钮的颜色
  50. cancelColor: {
  51. type: String,
  52. default: defprops.picker.cancelColor
  53. },
  54. // 确认按钮的颜色
  55. confirmColor: {
  56. type: String,
  57. default: defprops.picker.confirmColor
  58. },
  59. // 每列中可见选项的数量
  60. visibleItemCount: {
  61. type: [String, Number],
  62. default: defprops.picker.visibleItemCount
  63. },
  64. // 选项对象中,需要展示的属性键名
  65. keyName: {
  66. type: String,
  67. default: defprops.picker.keyName
  68. },
  69. // 是否允许点击遮罩关闭选择器
  70. closeOnClickOverlay: {
  71. type: Boolean,
  72. default: defprops.picker.closeOnClickOverlay
  73. },
  74. // 各列的默认索引
  75. defaultIndex: {
  76. type: Array,
  77. default: defprops.picker.defaultIndex
  78. },
  79. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  80. immediateChange: {
  81. type: Boolean,
  82. default: defprops.picker.immediateChange
  83. }
  84. }
  85. }