props.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 当前匹配项的name
  6. value: {
  7. type: [String, Number, null],
  8. default: () => defProps.tabbar.value
  9. },
  10. // 是否为iPhoneX留出底部安全距离
  11. safeAreaInsetBottom: {
  12. type: Boolean,
  13. default: () => defProps.tabbar.safeAreaInsetBottom
  14. },
  15. // 是否显示上方边框
  16. border: {
  17. type: Boolean,
  18. default: () => defProps.tabbar.border
  19. },
  20. // 上方边框颜色
  21. borderColor: {
  22. type: Boolean,
  23. default: () => defProps.tabbar.borderColor
  24. },
  25. // 元素层级z-index
  26. zIndex: {
  27. type: [String, Number],
  28. default: () => defProps.tabbar.zIndex
  29. },
  30. // 选中标签的颜色
  31. activeColor: {
  32. type: String,
  33. default: () => defProps.tabbar.activeColor
  34. },
  35. // 未选中标签的颜色
  36. inactiveColor: {
  37. type: String,
  38. default: () => defProps.tabbar.inactiveColor
  39. },
  40. // 是否固定在底部
  41. fixed: {
  42. type: Boolean,
  43. default: () => defProps.tabbar.fixed
  44. },
  45. // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
  46. placeholder: {
  47. type: Boolean,
  48. default: () => defProps.tabbar.placeholder
  49. },
  50. // 背景色
  51. backgroundColor: {
  52. type: String,
  53. default: () => defProps.tabbar.backgroundColor
  54. }
  55. }
  56. })