3
0

props.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. // 元素层级z-index
  21. zIndex: {
  22. type: [String, Number],
  23. default: () => defProps.tabbar.zIndex
  24. },
  25. // 选中标签的颜色
  26. activeColor: {
  27. type: String,
  28. default: () => defProps.tabbar.activeColor
  29. },
  30. // 未选中标签的颜色
  31. inactiveColor: {
  32. type: String,
  33. default: () => defProps.tabbar.inactiveColor
  34. },
  35. // 是否固定在底部
  36. fixed: {
  37. type: Boolean,
  38. default: () => defProps.tabbar.fixed
  39. },
  40. // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
  41. placeholder: {
  42. type: Boolean,
  43. default: () => defProps.tabbar.placeholder
  44. }
  45. }
  46. })