props.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js'
  3. export default defineProps('tabbar', {
  4. // 当前匹配项的name
  5. value: {
  6. type: [String, Number, null],
  7. default: null
  8. },
  9. // 是否为iPhoneX留出底部安全距离
  10. safeAreaInsetBottom: {
  11. type: Boolean,
  12. default: true
  13. },
  14. // 是否显示上方边框
  15. border: {
  16. type: Boolean,
  17. default: true
  18. },
  19. borderColor:{
  20. type: String,
  21. default: theme.borderColor
  22. },
  23. bgColor: {
  24. type: String,
  25. default: '#ffffff'
  26. },
  27. // 元素层级z-index
  28. zIndex: {
  29. type: [String, Number],
  30. default: 1
  31. },
  32. // 选中标签的颜色
  33. activeColor: {
  34. type: String,
  35. default: theme.primary
  36. },
  37. // 未选中标签的颜色
  38. inactiveColor: {
  39. type: String,
  40. default: theme.lightColor
  41. },
  42. // 是否固定在底部
  43. fixed: {
  44. type: Boolean,
  45. default: true
  46. },
  47. // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
  48. placeholder: {
  49. type: Boolean,
  50. default: true
  51. },
  52. // 标签栏的形状 可选项:normal, circle
  53. shape: {
  54. type: String,
  55. default: 'normal'
  56. },
  57. // 标签栏的高度
  58. height: {
  59. type: [String, Number],
  60. default: 50
  61. },
  62. // 是否自适应宽度
  63. fit: {
  64. type: Boolean,
  65. default: false
  66. },
  67. // 胶囊标签栏底部边距
  68. bottom: {
  69. type: [String, Number],
  70. default: 20
  71. },
  72. // 模式 可选项:normal,tag
  73. mode: {
  74. type: String,
  75. default: 'normal'
  76. }
  77. })