Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

95 строки
3.1 KiB

  1. import { defineMixin } from '../../libs/vue'
  2. import TabbarItemDefaultProps from './tabbarItem'
  3. import { registerComponentProps } from '../../libs/config/props.js'
  4. const defProps = registerComponentProps(TabbarItemDefaultProps)
  5. export const props = defineMixin({
  6. props: {
  7. // item标签的名称,作为与u-tabbar的value参数匹配的标识符
  8. name: {
  9. type: [String, Number, null],
  10. default: () => defProps.tabbarItem.name
  11. },
  12. // uview-plus内置图标或者绝对路径的图片
  13. icon: {
  14. type: String,
  15. default: () => defProps.tabbarItem.icon
  16. },
  17. // 激活态图标
  18. activeIcon: {
  19. type: String,
  20. default: () => defProps.tabbarItem.activeIcon
  21. },
  22. // 未激活态图标
  23. inactiveIcon: {
  24. type: String,
  25. default: () => defProps.tabbarItem.inactiveIcon
  26. },
  27. // 右上角的角标提示信息
  28. badge: {
  29. type: [String, Number, null],
  30. default: () => defProps.tabbarItem.badge
  31. },
  32. // 是否显示圆点,将会覆盖badge参数
  33. dot: {
  34. type: Boolean,
  35. default: () => defProps.tabbarItem.dot
  36. },
  37. // 描述文本
  38. text: {
  39. type: String,
  40. default: () => defProps.tabbarItem.text
  41. },
  42. // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
  43. badgeStyle: {
  44. type: [Object, String],
  45. default: () => defProps.tabbarItem.badgeStyle
  46. },
  47. // 模式,默认普通模式,midButton中间按钮模式
  48. mode: {
  49. type: String,
  50. default: () => defProps.tabbarItem.mode
  51. },
  52. // 激活态附加类名
  53. activeClass: {
  54. type: String,
  55. default: () => defProps.tabbarItem.activeClass
  56. },
  57. // 未激活态附加类名
  58. inactiveClass: {
  59. type: String,
  60. default: () => defProps.tabbarItem.inactiveClass
  61. },
  62. // 中间按钮背景色
  63. midButtonBgColor: {
  64. type: String,
  65. default: () => defProps.tabbarItem.midButtonBgColor
  66. },
  67. // 中间按钮图标颜色
  68. midButtonIconColor: {
  69. type: String,
  70. default: () => defProps.tabbarItem.midButtonIconColor
  71. },
  72. // 中间按钮图标大小
  73. midButtonIconSize: {
  74. type: [String, Number],
  75. default: () => defProps.tabbarItem.midButtonIconSize
  76. },
  77. // 中间按钮阴影
  78. midButtonBoxShadow: {
  79. type: String,
  80. default: () => defProps.tabbarItem.midButtonBoxShadow
  81. },
  82. // 中间按钮内层阴影
  83. midButtonInnerBoxShadow: {
  84. type: String,
  85. default: () => defProps.tabbarItem.midButtonInnerBoxShadow
  86. },
  87. // 中间按钮垂直偏移(负值为上移)
  88. midButtonOffsetY: {
  89. type: [String, Number],
  90. default: () => defProps.tabbarItem.midButtonOffsetY
  91. }
  92. }
  93. })