props.js 1.9 KB

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