Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

60 lignes
1.8 KiB

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