Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

80 rader
2.3 KiB

  1. import { defineMixin } from '../../libs/vue'
  2. import TabsDefaultProps from './tabs'
  3. import { registerComponentProps } from '../../libs/config/props.js'
  4. const defProps = registerComponentProps(TabsDefaultProps)
  5. export const props = defineMixin({
  6. props: {
  7. // 滑块的移动过渡时间,单位ms
  8. duration: {
  9. type: Number,
  10. default: () => defProps.tabs.duration
  11. },
  12. // tabs标签数组
  13. list: {
  14. type: Array,
  15. default: () => defProps.tabs.list
  16. },
  17. // 滑块颜色
  18. lineColor: {
  19. type: String,
  20. default: () => defProps.tabs.lineColor
  21. },
  22. // 菜单选择中时的样式
  23. activeStyle: {
  24. type: [String, Object],
  25. default: () => defProps.tabs.activeStyle
  26. },
  27. // 菜单非选中时的样式
  28. inactiveStyle: {
  29. type: [String, Object],
  30. default: () => defProps.tabs.inactiveStyle
  31. },
  32. // 滑块长度
  33. lineWidth: {
  34. type: [String, Number],
  35. default: () => defProps.tabs.lineWidth
  36. },
  37. // 滑块高度
  38. lineHeight: {
  39. type: [String, Number],
  40. default: () => defProps.tabs.lineHeight
  41. },
  42. // 滑块背景显示大小,当滑块背景设置为图片时使用
  43. lineBgSize: {
  44. type: String,
  45. default: () => defProps.tabs.lineBgSize
  46. },
  47. // 菜单item的样式
  48. itemStyle: {
  49. type: [String, Object],
  50. default: () => defProps.tabs.itemStyle
  51. },
  52. // 菜单是否可滚动
  53. scrollable: {
  54. type: Boolean,
  55. default: () => defProps.tabs.scrollable
  56. },
  57. // 当前选中标签的索引
  58. current: {
  59. type: [Number, String],
  60. default: () => defProps.tabs.current
  61. },
  62. // 默认读取的键名
  63. keyName: {
  64. type: String,
  65. default: () => defProps.tabs.keyName
  66. },
  67. // 左侧图标样式
  68. iconStyle: {
  69. type: [String, Object],
  70. default: () => defProps.tabs.iconStyle
  71. },
  72. // 形态模式,可选:capsule/card/pill-arrow/tag
  73. shapeMode: {
  74. type: String,
  75. default: () => defProps.tabs.shapeMode
  76. }
  77. }
  78. })