props.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js';
  3. export default defineProps('tabbarItem', {
  4. // item标签的名称,作为与u-tabbar的value参数匹配的标识符
  5. name: {
  6. type: [String, Number, null],
  7. default: null
  8. },
  9. // uView内置图标或者绝对路径的图片
  10. icon: {
  11. type: String,
  12. default: ''
  13. },
  14. iconSize: {
  15. type: [String, Number],
  16. default: 20
  17. },
  18. iconBgColor: {
  19. type: String,
  20. default: theme.primary
  21. },
  22. iconColor: {
  23. type: String,
  24. default: '#fff'
  25. },
  26. // 右上角的角标提示信息
  27. badge: {
  28. type: [String, Number, null],
  29. default: null
  30. },
  31. // 是否显示圆点,将会覆盖badge参数
  32. dot: {
  33. type: Boolean,
  34. default: false
  35. },
  36. // 描述文本
  37. text: {
  38. type: String,
  39. default: ''
  40. },
  41. // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
  42. badgeStyle: {
  43. type: [Object, String],
  44. default: 'top: 6px;right:2px;'
  45. },
  46. // 是否为中间凸起按钮
  47. middle: {
  48. type: Boolean,
  49. default: false
  50. }
  51. })