props.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 右边锚点非激活的颜色
  6. inactiveColor: {
  7. type: String,
  8. default: () => defProps.indexList.inactiveColor
  9. },
  10. // 右边锚点激活的颜色
  11. activeColor: {
  12. type: String,
  13. default: () => defProps.indexList.activeColor
  14. },
  15. // 索引字符列表,数组形式
  16. indexList: {
  17. type: Array,
  18. default: () => defProps.indexList.indexList
  19. },
  20. // 是否开启锚点自动吸顶
  21. sticky: {
  22. type: Boolean,
  23. default: () => defProps.indexList.sticky
  24. },
  25. // 自定义导航栏的高度
  26. customNavHeight: {
  27. type: [String, Number],
  28. default: () => defProps.indexList.customNavHeight
  29. },
  30. // 是否开启底部安全距离适配
  31. safeBottomFix: {
  32. type: Boolean,
  33. default: () => defProps.indexList.safeBottomFix
  34. },
  35. //自定义下边距
  36. itemMargin: {
  37. type: String,
  38. default: () => defProps.indexList.itemMargin
  39. },
  40. }
  41. })