props.js 1.5 KB

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