Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

70 linhas
2.3 KiB

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