You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.6 KiB

5 months ago
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 返回顶部的形状,circle-圆形,square-方形
  6. mode: {
  7. type: String,
  8. default: () => defProps.backtop.mode
  9. },
  10. // 自定义图标
  11. icon: {
  12. type: String,
  13. default: () => defProps.backtop.icon
  14. },
  15. // 提示文字
  16. text: {
  17. type: String,
  18. default: () => defProps.backtop.text
  19. },
  20. // 返回顶部滚动时间
  21. duration: {
  22. type: [String, Number],
  23. default: () => defProps.backtop.duration
  24. },
  25. // 滚动距离
  26. scrollTop: {
  27. type: [String, Number],
  28. default: () => defProps.backtop.scrollTop
  29. },
  30. // 距离顶部多少距离显示,单位px
  31. top: {
  32. type: [String, Number],
  33. default: () => defProps.backtop.top
  34. },
  35. // 返回顶部按钮到底部的距离,单位px
  36. bottom: {
  37. type: [String, Number],
  38. default: () => defProps.backtop.bottom
  39. },
  40. // 返回顶部按钮到右边的距离,单位px
  41. right: {
  42. type: [String, Number],
  43. default: () => defProps.backtop.right
  44. },
  45. // 层级
  46. zIndex: {
  47. type: [String, Number],
  48. default: () => defProps.backtop.zIndex
  49. },
  50. // 图标的样式,对象形式
  51. iconStyle: {
  52. type: Object,
  53. default: () => defProps.backtop.iconStyle
  54. }
  55. }
  56. })