You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

95 lines
2.8 KiB

  1. import { defineMixin } from '../../libs/vue'
  2. import TabbarDefaultProps from './tabbar'
  3. import { registerComponentProps } from '../../libs/config/props.js'
  4. const defProps = registerComponentProps(TabbarDefaultProps)
  5. export const props = defineMixin({
  6. props: {
  7. // 当前匹配项的name
  8. value: {
  9. type: [String, Number, null],
  10. default: () => defProps.tabbar.value
  11. },
  12. // 是否为iPhoneX留出底部安全距离
  13. safeAreaInsetBottom: {
  14. type: Boolean,
  15. default: () => defProps.tabbar.safeAreaInsetBottom
  16. },
  17. // 是否显示上方边框
  18. border: {
  19. type: Boolean,
  20. default: () => defProps.tabbar.border
  21. },
  22. // 上方边框颜色
  23. borderColor: {
  24. type: String,
  25. default: () => defProps.tabbar.borderColor
  26. },
  27. // 元素层级z-index
  28. zIndex: {
  29. type: [String, Number],
  30. default: () => defProps.tabbar.zIndex
  31. },
  32. // 选中标签的颜色
  33. activeColor: {
  34. type: String,
  35. default: () => defProps.tabbar.activeColor
  36. },
  37. // 未选中标签的颜色
  38. inactiveColor: {
  39. type: String,
  40. default: () => defProps.tabbar.inactiveColor
  41. },
  42. // 是否固定在底部
  43. fixed: {
  44. type: Boolean,
  45. default: () => defProps.tabbar.fixed
  46. },
  47. // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
  48. placeholder: {
  49. type: Boolean,
  50. default: () => defProps.tabbar.placeholder
  51. },
  52. // 背景色
  53. backgroundColor: {
  54. type: String,
  55. default: () => defProps.tabbar.backgroundColor
  56. },
  57. // 风格类型
  58. styleType: {
  59. type: String,
  60. default: () => defProps.tabbar.styleType
  61. },
  62. // 激活动画类型
  63. animationType: {
  64. type: String,
  65. default: () => defProps.tabbar.animationType
  66. },
  67. // 选中项背景色
  68. activeBackgroundColor: {
  69. type: String,
  70. default: () => defProps.tabbar.activeBackgroundColor
  71. },
  72. // 未选中项背景色
  73. inactiveBackgroundColor: {
  74. type: String,
  75. default: () => defProps.tabbar.inactiveBackgroundColor
  76. },
  77. // item 形状
  78. itemShape: {
  79. type: String,
  80. default: () => defProps.tabbar.itemShape
  81. },
  82. // 图标缩放比例
  83. iconScale: {
  84. type: [String, Number],
  85. default: () => defProps.tabbar.iconScale
  86. },
  87. // 文本显示模式
  88. textMode: {
  89. type: String,
  90. default: () => defProps.tabbar.textMode
  91. }
  92. }
  93. })