props.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. export default {
  2. props: {
  3. // 列表数据
  4. list: {
  5. type: Array,
  6. default: ()=>[]
  7. },
  8. // 从list元素对象中读取的键名,默认name
  9. keyName: {
  10. type: String,
  11. default: 'name'
  12. },
  13. // 当前选中项
  14. current: {
  15. type: [Number, String],
  16. default: 0
  17. },
  18. // 头部内容的高度
  19. hdHeight: {
  20. type: [Number, String],
  21. default: 0
  22. },
  23. // 是否联动,默认开启联动
  24. chain: {
  25. type: Boolean,
  26. default: true
  27. },
  28. // 整个列表的高度,默认auto屏幕高度
  29. height: {
  30. type: [Number, String],
  31. default: 'auto'
  32. },
  33. // 左边列表的宽度,默认200rpx
  34. barWidth: {
  35. type: [Number, String],
  36. default: '180rpx'
  37. },
  38. // 左边列表是否允许滚动
  39. barScrollable: {
  40. type: Boolean,
  41. default: true
  42. },
  43. // 背景颜色 默认主题颜色 $bg-color
  44. barBgColor: {
  45. type: String,
  46. default: ''
  47. },
  48. // 左边列表的自定义样式
  49. barStyle: {
  50. type: [Object, String],
  51. default: ''
  52. },
  53. // 左边列表项的自定义样式
  54. barItemStyle: {
  55. type: [Object, String],
  56. default: ''
  57. },
  58. // 左边选择项激活时的自定义样式
  59. barItemActiveStyle: {
  60. type: [Object, String],
  61. default: ''
  62. },
  63. // 左边选择项激活时的左边线条自定义样式
  64. barItemActiveLineStyle: {
  65. type: [Object, String],
  66. default: ''
  67. },
  68. // 菜单项中的徽标自定义样式,比如定位位置
  69. barItemBadgeStyle: {
  70. type: [Object, String],
  71. default: ''
  72. },
  73. // 右边区域自定义样式
  74. contentStyle: {
  75. type: [Object, String],
  76. default: ''
  77. }
  78. }
  79. }