props.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. })