3
0

props.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // tab的数据
  6. list: {
  7. type: Array,
  8. default: () => defProps.subsection.list
  9. },
  10. // 当前活动的tab的index
  11. current: {
  12. type: [String, Number],
  13. default: () => defProps.subsection.current
  14. },
  15. // 激活的颜色
  16. activeColor: {
  17. type: String,
  18. default: () => defProps.subsection.activeColor
  19. },
  20. // 未激活的颜色
  21. inactiveColor: {
  22. type: String,
  23. default: () => defProps.subsection.inactiveColor
  24. },
  25. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  26. mode: {
  27. type: String,
  28. default: () => defProps.subsection.mode
  29. },
  30. // 字体大小
  31. fontSize: {
  32. type: [String, Number],
  33. default: () => defProps.subsection.fontSize
  34. },
  35. // 激活tab的字体是否加粗
  36. bold: {
  37. type: Boolean,
  38. default: () => defProps.subsection.bold
  39. },
  40. // mode = button时,组件背景颜色
  41. bgColor: {
  42. type: String,
  43. default: () => defProps.subsection.bgColor
  44. },
  45. // 从list元素对象中读取的键名
  46. keyName: {
  47. type: String,
  48. default: () => defProps.subsection.keyName
  49. }
  50. }
  51. })