3
0

props.js 1.9 KB

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