index.a55b3f51.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. import{_ as p,l as r,w as s,j as e,k as l,f as i,e as n,b as t,a as h,q as g,d as v}from"./index.3fe853a6.js";const I={};function x(u,a){const o=e("a-back-top"),c=e("demo-box");return l(),r(c,{jsfiddle:{us:"The simplest usage.",cn:"\u6700\u7B80\u5355\u7684\u7528\u6CD5\u3002",docHtml:`<h2 id="zh-CN">zh-CN <a class="header-anchor" href="#zh-CN">
  2. <span aria-hidden="true" class="anchor">#</span>
  3. </a></h2>
  4. <p>\u6700\u7B80\u5355\u7684\u7528\u6CD5\u3002</p>
  5. <h2 id="en-US">en-US <a class="header-anchor" href="#en-US">
  6. <span aria-hidden="true" class="anchor">#</span>
  7. </a></h2>
  8. <p>The simplest usage.</p>
  9. `,order:0,title:{"zh-CN":"\u57FA\u672C\u4F7F\u7528","en-US":"Basic Usage"},relativePath:"components/back-top/demo/basic.vue",sourceCode:"PHRlbXBsYXRlPgogIDxhLWJhY2stdG9wIC8+CiAgU2Nyb2xsIGRvd24gdG8gc2VlIHRoZSBib3R0b20tcmlnaHQKICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogcmdiYSg2NCwgNjQsIDY0LCAwLjYpIj5ncmF5PC9zdHJvbmc+CiAgYnV0dG9uLgo8L3RlbXBsYXRlPgoKCg==",jsSourceCode:"PHRlbXBsYXRlPgogIDxhLWJhY2stdG9wIC8+CiAgU2Nyb2xsIGRvd24gdG8gc2VlIHRoZSBib3R0b20tcmlnaHQKICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogcmdiYSg2NCwgNjQsIDY0LCAwLjYpIj5ncmF5PC9zdHJvbmc+CiAgYnV0dG9uLgo8L3RlbXBsYXRlPg=="}},{default:s(()=>[i(o),a[0]||(a[0]=n(" Scroll down to see the bottom-right ")),a[1]||(a[1]=t("strong",{style:{color:"rgba(64, 64, 64, 0.6)"}},"gray",-1)),a[2]||(a[2]=n(" button. "))]),htmlCode:s(()=>a[3]||(a[3]=[t("pre",{class:"language-vue"},[t("code",null,[t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  10. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("a-back-top")]),n(),t("span",{class:"token punctuation"},"/>")]),n(`
  11. Scroll down to see the bottom-right
  12. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("strong")]),n(),t("span",{class:"token special-attr"},[t("span",{class:"token attr-name"},"style"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),t("span",{class:"token value css language-css"},[t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(),t("span",{class:"token function"},"rgba"),t("span",{class:"token punctuation"},"("),n("64"),t("span",{class:"token punctuation"},","),n(" 64"),t("span",{class:"token punctuation"},","),n(" 64"),t("span",{class:"token punctuation"},","),n(" 0.6"),t("span",{class:"token punctuation"},")")]),t("span",{class:"token punctuation"},'"')])]),t("span",{class:"token punctuation"},">")]),n("gray"),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("strong")]),t("span",{class:"token punctuation"},">")]),n(`
  13. button.
  14. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  15. `)])],-1)])),jsVersionHtml:s(()=>a[4]||(a[4]=[t("pre",{class:"language-vue"},[t("code",null,[t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  16. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("a-back-top")]),n(),t("span",{class:"token punctuation"},"/>")]),n(`
  17. Scroll down to see the bottom-right
  18. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("strong")]),n(),t("span",{class:"token special-attr"},[t("span",{class:"token attr-name"},"style"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),t("span",{class:"token value css language-css"},[t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(),t("span",{class:"token function"},"rgba"),t("span",{class:"token punctuation"},"("),n("64"),t("span",{class:"token punctuation"},","),n(" 64"),t("span",{class:"token punctuation"},","),n(" 64"),t("span",{class:"token punctuation"},","),n(" 0.6"),t("span",{class:"token punctuation"},")")]),t("span",{class:"token punctuation"},'"')])]),t("span",{class:"token punctuation"},">")]),n("gray"),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("strong")]),t("span",{class:"token punctuation"},">")]),n(`
  19. button.
  20. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  21. `)])],-1)])),_:1})}const C=p(I,[["render",x]]);const f={},w={id:"components-back-top-demo-custom"};function A(u,a){const o=e("a-back-top"),c=e("demo-box");return l(),r(c,{jsfiddle:{us:"You can customize the style of the button, just note the size limit: no more than `40px * 40px`.",cn:"\u53EF\u4EE5\u81EA\u5B9A\u4E49\u56DE\u5230\u9876\u90E8\u6309\u94AE\u7684\u6837\u5F0F\uFF0C\u9650\u5236\u5BBD\u9AD8\uFF1A`40px * 40px`\u3002",docHtml:`<h2 id="zh-CN">zh-CN <a class="header-anchor" href="#zh-CN">
  22. <span aria-hidden="true" class="anchor">#</span>
  23. </a></h2>
  24. <p>\u53EF\u4EE5\u81EA\u5B9A\u4E49\u56DE\u5230\u9876\u90E8\u6309\u94AE\u7684\u6837\u5F0F\uFF0C\u9650\u5236\u5BBD\u9AD8\uFF1A<code>40px * 40px</code>\u3002</p>
  25. <h2 id="en-US">en-US <a class="header-anchor" href="#en-US">
  26. <span aria-hidden="true" class="anchor">#</span>
  27. </a></h2>
  28. <p>You can customize the style of the button, just note the size limit: no more than <code>40px * 40px</code>.</p>
  29. `,order:1,title:{"zh-CN":"\u81EA\u5B9A\u4E49\u6837\u5F0F","en-US":"Custom style"},relativePath:"components/back-top/demo/custom.vue",sourceCode:"PHRlbXBsYXRlPgogIDxkaXYgaWQ9ImNvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20iPgogICAgPGEtYmFjay10b3A+CiAgICAgIDxkaXYgY2xhc3M9ImFudC1iYWNrLXRvcC1pbm5lciI+VVA8L2Rpdj4KICAgIDwvYS1iYWNrLXRvcD4KICAgIFNjcm9sbCBkb3duIHRvIHNlZSB0aGUgYm90dG9tLXJpZ2h0CiAgICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogIzEwODhlOSI+Ymx1ZTwvc3Ryb25nPgogICAgYnV0dG9uLgogIDwvZGl2Pgo8L3RlbXBsYXRlPgoKPHN0eWxlIHNjb3BlZD4KI2NvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20gLmFudC1iYWNrLXRvcCB7CiAgYm90dG9tOiAxMDBweDsKfQojY29tcG9uZW50cy1iYWNrLXRvcC1kZW1vLWN1c3RvbSAuYW50LWJhY2stdG9wLWlubmVyIHsKICBoZWlnaHQ6IDQwcHg7CiAgd2lkdGg6IDQwcHg7CiAgbGluZS1oZWlnaHQ6IDQwcHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIGJhY2tncm91bmQtY29sb3I6ICMxMDg4ZTk7CiAgY29sb3I6ICNmZmY7CiAgdGV4dC1hbGlnbjogY2VudGVyOwogIGZvbnQtc2l6ZTogMjBweDsKfQo8L3N0eWxlPgo=",jsSourceCode:"PHRlbXBsYXRlPgogIDxkaXYgaWQ9ImNvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20iPgogICAgPGEtYmFjay10b3A+CiAgICAgIDxkaXYgY2xhc3M9ImFudC1iYWNrLXRvcC1pbm5lciI+VVA8L2Rpdj4KICAgIDwvYS1iYWNrLXRvcD4KICAgIFNjcm9sbCBkb3duIHRvIHNlZSB0aGUgYm90dG9tLXJpZ2h0CiAgICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogIzEwODhlOSI+Ymx1ZTwvc3Ryb25nPgogICAgYnV0dG9uLgogIDwvZGl2Pgo8L3RlbXBsYXRlPgoKPHN0eWxlIHNjb3BlZD4KI2NvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20gLmFudC1iYWNrLXRvcCB7CiAgYm90dG9tOiAxMDBweDsKfQojY29tcG9uZW50cy1iYWNrLXRvcC1kZW1vLWN1c3RvbSAuYW50LWJhY2stdG9wLWlubmVyIHsKICBoZWlnaHQ6IDQwcHg7CiAgd2lkdGg6IDQwcHg7CiAgbGluZS1oZWlnaHQ6IDQwcHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIGJhY2tncm91bmQtY29sb3I6ICMxMDg4ZTk7CiAgY29sb3I6ICNmZmY7CiAgdGV4dC1hbGlnbjogY2VudGVyOwogIGZvbnQtc2l6ZTogMjBweDsKfQo8L3N0eWxlPg=="}},{default:s(()=>[t("div",w,[i(o,null,{default:s(()=>a[0]||(a[0]=[t("div",{class:"ant-back-top-inner"},"UP",-1)])),_:1,__:[0]}),a[1]||(a[1]=n(" Scroll down to see the bottom-right ")),a[2]||(a[2]=t("strong",{style:{color:"#1088e9"}},"blue",-1)),a[3]||(a[3]=n(" button. "))])]),htmlCode:s(()=>a[4]||(a[4]=[t("pre",{class:"language-vue"},[t("code",null,[t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  30. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("div")]),n(),t("span",{class:"token attr-name"},"id"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),n("components-back-top-demo-custom"),t("span",{class:"token punctuation"},'"')]),t("span",{class:"token punctuation"},">")]),n(`
  31. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("a-back-top")]),t("span",{class:"token punctuation"},">")]),n(`
  32. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("div")]),n(),t("span",{class:"token attr-name"},"class"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),n("ant-back-top-inner"),t("span",{class:"token punctuation"},'"')]),t("span",{class:"token punctuation"},">")]),n("UP"),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("div")]),t("span",{class:"token punctuation"},">")]),n(`
  33. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("a-back-top")]),t("span",{class:"token punctuation"},">")]),n(`
  34. Scroll down to see the bottom-right
  35. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("strong")]),n(),t("span",{class:"token special-attr"},[t("span",{class:"token attr-name"},"style"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),t("span",{class:"token value css language-css"},[t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(" #1088e9")]),t("span",{class:"token punctuation"},'"')])]),t("span",{class:"token punctuation"},">")]),n("blue"),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("strong")]),t("span",{class:"token punctuation"},">")]),n(`
  36. button.
  37. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("div")]),t("span",{class:"token punctuation"},">")]),n(`
  38. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  39. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("style")]),n(),t("span",{class:"token attr-name"},"scoped"),t("span",{class:"token punctuation"},">")]),t("span",{class:"token style"},[t("span",{class:"token language-css"},[n(`
  40. `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top"),n(),t("span",{class:"token punctuation"},"{"),n(`
  41. `),t("span",{class:"token property"},"bottom"),t("span",{class:"token punctuation"},":"),n(" 100px"),t("span",{class:"token punctuation"},";"),n(`
  42. `),t("span",{class:"token punctuation"},"}"),n(`
  43. `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top-inner"),n(),t("span",{class:"token punctuation"},"{"),n(`
  44. `),t("span",{class:"token property"},"height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
  45. `),t("span",{class:"token property"},"width"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
  46. `),t("span",{class:"token property"},"line-height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
  47. `),t("span",{class:"token property"},"border-radius"),t("span",{class:"token punctuation"},":"),n(" 4px"),t("span",{class:"token punctuation"},";"),n(`
  48. `),t("span",{class:"token property"},"background-color"),t("span",{class:"token punctuation"},":"),n(" #1088e9"),t("span",{class:"token punctuation"},";"),n(`
  49. `),t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(" #fff"),t("span",{class:"token punctuation"},";"),n(`
  50. `),t("span",{class:"token property"},"text-align"),t("span",{class:"token punctuation"},":"),n(" center"),t("span",{class:"token punctuation"},";"),n(`
  51. `),t("span",{class:"token property"},"font-size"),t("span",{class:"token punctuation"},":"),n(" 20px"),t("span",{class:"token punctuation"},";"),n(`
  52. `),t("span",{class:"token punctuation"},"}"),n(`
  53. `)])]),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("style")]),t("span",{class:"token punctuation"},">")]),n(`
  54. `)])],-1)])),jsVersionHtml:s(()=>a[5]||(a[5]=[t("pre",{class:"language-vue"},[t("code",null,[t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  55. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("div")]),n(),t("span",{class:"token attr-name"},"id"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),n("components-back-top-demo-custom"),t("span",{class:"token punctuation"},'"')]),t("span",{class:"token punctuation"},">")]),n(`
  56. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("a-back-top")]),t("span",{class:"token punctuation"},">")]),n(`
  57. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("div")]),n(),t("span",{class:"token attr-name"},"class"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),n("ant-back-top-inner"),t("span",{class:"token punctuation"},'"')]),t("span",{class:"token punctuation"},">")]),n("UP"),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("div")]),t("span",{class:"token punctuation"},">")]),n(`
  58. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("a-back-top")]),t("span",{class:"token punctuation"},">")]),n(`
  59. Scroll down to see the bottom-right
  60. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("strong")]),n(),t("span",{class:"token special-attr"},[t("span",{class:"token attr-name"},"style"),t("span",{class:"token attr-value"},[t("span",{class:"token punctuation attr-equals"},"="),t("span",{class:"token punctuation"},'"'),t("span",{class:"token value css language-css"},[t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(" #1088e9")]),t("span",{class:"token punctuation"},'"')])]),t("span",{class:"token punctuation"},">")]),n("blue"),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("strong")]),t("span",{class:"token punctuation"},">")]),n(`
  61. button.
  62. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("div")]),t("span",{class:"token punctuation"},">")]),n(`
  63. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
  64. `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"<"),n("style")]),n(),t("span",{class:"token attr-name"},"scoped"),t("span",{class:"token punctuation"},">")]),t("span",{class:"token style"},[t("span",{class:"token language-css"},[n(`
  65. `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top"),n(),t("span",{class:"token punctuation"},"{"),n(`
  66. `),t("span",{class:"token property"},"bottom"),t("span",{class:"token punctuation"},":"),n(" 100px"),t("span",{class:"token punctuation"},";"),n(`
  67. `),t("span",{class:"token punctuation"},"}"),n(`
  68. `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top-inner"),n(),t("span",{class:"token punctuation"},"{"),n(`
  69. `),t("span",{class:"token property"},"height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
  70. `),t("span",{class:"token property"},"width"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
  71. `),t("span",{class:"token property"},"line-height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
  72. `),t("span",{class:"token property"},"border-radius"),t("span",{class:"token punctuation"},":"),n(" 4px"),t("span",{class:"token punctuation"},";"),n(`
  73. `),t("span",{class:"token property"},"background-color"),t("span",{class:"token punctuation"},":"),n(" #1088e9"),t("span",{class:"token punctuation"},";"),n(`
  74. `),t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(" #fff"),t("span",{class:"token punctuation"},";"),n(`
  75. `),t("span",{class:"token property"},"text-align"),t("span",{class:"token punctuation"},":"),n(" center"),t("span",{class:"token punctuation"},";"),n(`
  76. `),t("span",{class:"token property"},"font-size"),t("span",{class:"token punctuation"},":"),n(" 20px"),t("span",{class:"token punctuation"},";"),n(`
  77. `),t("span",{class:"token punctuation"},"}"),n(`
  78. `)])]),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("style")]),t("span",{class:"token punctuation"},">")]),n(`
  79. `)])],-1)])),_:1})}const Y=p(f,[["render",A],["__scopeId","data-v-e0991442"]]),N={pageData:{title:"BackTop",description:"",frontmatter:{category:"Components",type:"\u5176\u4ED6",subtitle:"\u56DE\u5230\u9876\u90E8",title:"BackTop",cover:"https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg"},headers:[{level:2,title:"\u4F55\u65F6\u4F7F\u7528",slug:"\u4F55\u65F6\u4F7F\u7528",content:""},{level:2,title:"API",slug:"API",content:""},{level:3,title:"\u4E8B\u4EF6",slug:"\u4E8B\u4EF6",content:""}],relativePath:"components/back-top/index.zh-CN.md",content:`
  80. \u8FD4\u56DE\u9875\u9762\u9876\u90E8\u7684\u64CD\u4F5C\u6309\u94AE\u3002
  81. ## \u4F55\u65F6\u4F7F\u7528
  82. - \u5F53\u9875\u9762\u5185\u5BB9\u533A\u57DF\u6BD4\u8F83\u957F\u65F6\uFF1B
  83. - \u5F53\u7528\u6237\u9700\u8981\u9891\u7E41\u8FD4\u56DE\u9876\u90E8\u67E5\u770B\u76F8\u5173\u5185\u5BB9\u65F6\u3002
  84. ## API
  85. &gt; \u6709\u9ED8\u8BA4\u6837\u5F0F\uFF0C\u8DDD\u79BB\u5E95\u90E8 \`50px\`\uFF0C\u53EF\u8986\u76D6\u3002
  86. &gt;
  87. &gt; \u81EA\u5B9A\u4E49\u6837\u5F0F\u5BBD\u9AD8\u4E0D\u5927\u4E8E 40px \\* 40px\u3002
  88. | \u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C | \u7248\u672C |
  89. | --- | --- | --- | --- | --- |
  90. | target | \u8BBE\u7F6E\u9700\u8981\u76D1\u542C\u5176\u6EDA\u52A8\u4E8B\u4EF6\u7684\u5143\u7D20\uFF0C\u503C\u4E3A\u4E00\u4E2A\u8FD4\u56DE\u5BF9\u5E94 DOM \u5143\u7D20\u7684\u51FD\u6570 | Function | () =&gt; window | |
  91. | visibilityHeight | \u6EDA\u52A8\u9AD8\u5EA6\u8FBE\u5230\u6B64\u53C2\u6570\u503C\u624D\u51FA\u73B0 \`BackTop\` | number | 400 | |
  92. ### \u4E8B\u4EF6
  93. | \u4E8B\u4EF6\u540D\u79F0 | \u8BF4\u660E | \u56DE\u8C03\u53C2\u6570 | \u7248\u672C |
  94. | -------- | ------------------ | -------- | ---- |
  95. | click | \u70B9\u51FB\u6309\u94AE\u7684\u56DE\u8C03\u51FD\u6570 | Function | |
  96. `,html:`<p>\u8FD4\u56DE\u9875\u9762\u9876\u90E8\u7684\u64CD\u4F5C\u6309\u94AE\u3002</p>
  97. <h2 id="\u4F55\u65F6\u4F7F\u7528">\u4F55\u65F6\u4F7F\u7528 <a class="header-anchor" href="#\u4F55\u65F6\u4F7F\u7528">
  98. <span aria-hidden="true" class="anchor">#</span>
  99. </a></h2>
  100. <ul>
  101. <li>\u5F53\u9875\u9762\u5185\u5BB9\u533A\u57DF\u6BD4\u8F83\u957F\u65F6\uFF1B</li>
  102. <li>\u5F53\u7528\u6237\u9700\u8981\u9891\u7E41\u8FD4\u56DE\u9876\u90E8\u67E5\u770B\u76F8\u5173\u5185\u5BB9\u65F6\u3002</li>
  103. </ul>
  104. <h2 id="API">API <a class="header-anchor" href="#API">
  105. <span aria-hidden="true" class="anchor">#</span>
  106. </a></h2>
  107. <blockquote>
  108. <p>\u6709\u9ED8\u8BA4\u6837\u5F0F\uFF0C\u8DDD\u79BB\u5E95\u90E8 <code>50px</code>\uFF0C\u53EF\u8986\u76D6\u3002</p>
  109. <p>\u81EA\u5B9A\u4E49\u6837\u5F0F\u5BBD\u9AD8\u4E0D\u5927\u4E8E 40px * 40px\u3002</p>
  110. </blockquote>
  111. <table>
  112. <thead>
  113. <tr>
  114. <th>\u53C2\u6570</th>
  115. <th>\u8BF4\u660E</th>
  116. <th>\u7C7B\u578B</th>
  117. <th>\u9ED8\u8BA4\u503C</th>
  118. <th>\u7248\u672C</th>
  119. </tr>
  120. </thead>
  121. <tbody>
  122. <tr>
  123. <td>target</td>
  124. <td>\u8BBE\u7F6E\u9700\u8981\u76D1\u542C\u5176\u6EDA\u52A8\u4E8B\u4EF6\u7684\u5143\u7D20\uFF0C\u503C\u4E3A\u4E00\u4E2A\u8FD4\u56DE\u5BF9\u5E94 DOM \u5143\u7D20\u7684\u51FD\u6570</td>
  125. <td>Function</td>
  126. <td>() =&gt; window</td>
  127. <td></td>
  128. </tr>
  129. <tr>
  130. <td>visibilityHeight</td>
  131. <td>\u6EDA\u52A8\u9AD8\u5EA6\u8FBE\u5230\u6B64\u53C2\u6570\u503C\u624D\u51FA\u73B0 <code>BackTop</code></td>
  132. <td>number</td>
  133. <td>400</td>
  134. <td></td>
  135. </tr>
  136. </tbody>
  137. </table>
  138. <h3 id="\u4E8B\u4EF6">\u4E8B\u4EF6 <a class="header-anchor" href="#\u4E8B\u4EF6">
  139. <span aria-hidden="true" class="anchor">#</span>
  140. </a></h3>
  141. <table>
  142. <thead>
  143. <tr>
  144. <th>\u4E8B\u4EF6\u540D\u79F0</th>
  145. <th>\u8BF4\u660E</th>
  146. <th>\u56DE\u8C03\u53C2\u6570</th>
  147. <th>\u7248\u672C</th>
  148. </tr>
  149. </thead>
  150. <tbody>
  151. <tr>
  152. <td>click</td>
  153. <td>\u70B9\u51FB\u6309\u94AE\u7684\u56DE\u8C03\u51FD\u6570</td>
  154. <td>Function</td>
  155. <td></td>
  156. </tr>
  157. </tbody>
  158. </table>
  159. `,lastUpdated:1748060300531}},P={class:"markdown"};function H(u,a,o,c,d,k){return l(),h("article",P,a[0]||(a[0]=[g('<p>\u8FD4\u56DE\u9875\u9762\u9876\u90E8\u7684\u64CD\u4F5C\u6309\u94AE\u3002</p><h2 id="\u4F55\u65F6\u4F7F\u7528">\u4F55\u65F6\u4F7F\u7528 <a class="header-anchor" href="#\u4F55\u65F6\u4F7F\u7528"><span aria-hidden="true" class="anchor">#</span></a></h2><ul><li>\u5F53\u9875\u9762\u5185\u5BB9\u533A\u57DF\u6BD4\u8F83\u957F\u65F6\uFF1B</li><li>\u5F53\u7528\u6237\u9700\u8981\u9891\u7E41\u8FD4\u56DE\u9876\u90E8\u67E5\u770B\u76F8\u5173\u5185\u5BB9\u65F6\u3002</li></ul><h2 id="API">API <a class="header-anchor" href="#API"><span aria-hidden="true" class="anchor">#</span></a></h2><blockquote><p>\u6709\u9ED8\u8BA4\u6837\u5F0F\uFF0C\u8DDD\u79BB\u5E95\u90E8 <code>50px</code>\uFF0C\u53EF\u8986\u76D6\u3002</p><p>\u81EA\u5B9A\u4E49\u6837\u5F0F\u5BBD\u9AD8\u4E0D\u5927\u4E8E 40px * 40px\u3002</p></blockquote><table><thead><tr><th>\u53C2\u6570</th><th>\u8BF4\u660E</th><th>\u7C7B\u578B</th><th>\u9ED8\u8BA4\u503C</th><th>\u7248\u672C</th></tr></thead><tbody><tr><td>target</td><td>\u8BBE\u7F6E\u9700\u8981\u76D1\u542C\u5176\u6EDA\u52A8\u4E8B\u4EF6\u7684\u5143\u7D20\uFF0C\u503C\u4E3A\u4E00\u4E2A\u8FD4\u56DE\u5BF9\u5E94 DOM \u5143\u7D20\u7684\u51FD\u6570</td><td>Function</td><td>() =&gt; window</td><td></td></tr><tr><td>visibilityHeight</td><td>\u6EDA\u52A8\u9AD8\u5EA6\u8FBE\u5230\u6B64\u53C2\u6570\u503C\u624D\u51FA\u73B0 <code>BackTop</code></td><td>number</td><td>400</td><td></td></tr></tbody></table><h3 id="\u4E8B\u4EF6">\u4E8B\u4EF6 <a class="header-anchor" href="#\u4E8B\u4EF6"><span aria-hidden="true" class="anchor">#</span></a></h3><table><thead><tr><th>\u4E8B\u4EF6\u540D\u79F0</th><th>\u8BF4\u660E</th><th>\u56DE\u8C03\u53C2\u6570</th><th>\u7248\u672C</th></tr></thead><tbody><tr><td>click</td><td>\u70B9\u51FB\u6309\u94AE\u7684\u56DE\u8C03\u51FD\u6570</td><td>Function</td><td></td></tr></tbody></table>',8)]))}const B=p(N,[["render",H]]),W={pageData:{title:"BackTop",description:"",frontmatter:{category:"Components",type:"Other",title:"BackTop",cover:"https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg"},headers:[{level:2,title:"When To Use",slug:"When-To-Use",content:""},{level:2,title:"API",slug:"API",content:""},{level:3,title:"events",slug:"events",content:""}],relativePath:"components/back-top/index.en-US.md",content:`
  160. \`BackTop\` makes it easy to go back to the top of the page.
  161. ## When To Use
  162. - When the page content is very long.
  163. - When you need to go back to the top very frequently in order to view the contents.
  164. ## API
  165. &gt; The distance to the bottom is set to \`50px\` by default, which is overridable.
  166. &gt;
  167. &gt; If you decide to use custom styles, please note the size limit: no more than \`40px * 40px\`.
  168. | Property | Description | Type | Default | Version |
  169. | --- | --- | --- | --- | --- |
  170. | target | specifies the scrollable area dom node | () =&gt; HTMLElement | () =&gt; window | |
  171. | visibilityHeight | the \`BackTop\` button will not show until the scroll height reaches this value | number | 400 | |
  172. ### events
  173. | Events Name | Description | Arguments | Version |
  174. | --- | --- | --- | --- |
  175. | click | a callback function, which can be executed when you click the button | Function | |
  176. `,html:`<p><code>BackTop</code> makes it easy to go back to the top of the page.</p>
  177. <h2 id="When-To-Use">When To Use <a class="header-anchor" href="#When-To-Use">
  178. <span aria-hidden="true" class="anchor">#</span>
  179. </a></h2>
  180. <ul>
  181. <li>When the page content is very long.</li>
  182. <li>When you need to go back to the top very frequently in order to view the contents.</li>
  183. </ul>
  184. <h2 id="API">API <a class="header-anchor" href="#API">
  185. <span aria-hidden="true" class="anchor">#</span>
  186. </a></h2>
  187. <blockquote>
  188. <p>The distance to the bottom is set to <code>50px</code> by default, which is overridable.</p>
  189. <p>If you decide to use custom styles, please note the size limit: no more than <code>40px * 40px</code>.</p>
  190. </blockquote>
  191. <table>
  192. <thead>
  193. <tr>
  194. <th>Property</th>
  195. <th>Description</th>
  196. <th>Type</th>
  197. <th>Default</th>
  198. <th>Version</th>
  199. </tr>
  200. </thead>
  201. <tbody>
  202. <tr>
  203. <td>target</td>
  204. <td>specifies the scrollable area dom node</td>
  205. <td>() =&gt; HTMLElement</td>
  206. <td>() =&gt; window</td>
  207. <td></td>
  208. </tr>
  209. <tr>
  210. <td>visibilityHeight</td>
  211. <td>the <code>BackTop</code> button will not show until the scroll height reaches this value</td>
  212. <td>number</td>
  213. <td>400</td>
  214. <td></td>
  215. </tr>
  216. </tbody>
  217. </table>
  218. <h3 id="events">events <a class="header-anchor" href="#events">
  219. <span aria-hidden="true" class="anchor">#</span>
  220. </a></h3>
  221. <table>
  222. <thead>
  223. <tr>
  224. <th>Events Name</th>
  225. <th>Description</th>
  226. <th>Arguments</th>
  227. <th>Version</th>
  228. </tr>
  229. </thead>
  230. <tbody>
  231. <tr>
  232. <td>click</td>
  233. <td>a callback function, which can be executed when you click the button</td>
  234. <td>Function</td>
  235. <td></td>
  236. </tr>
  237. </tbody>
  238. </table>
  239. `,lastUpdated:1748060300531}},_={class:"markdown"};function j(u,a,o,c,d,k){return l(),h("article",_,a[0]||(a[0]=[g('<p><code>BackTop</code> makes it easy to go back to the top of the page.</p><h2 id="When-To-Use">When To Use <a class="header-anchor" href="#When-To-Use"><span aria-hidden="true" class="anchor">#</span></a></h2><ul><li>When the page content is very long.</li><li>When you need to go back to the top very frequently in order to view the contents.</li></ul><h2 id="API">API <a class="header-anchor" href="#API"><span aria-hidden="true" class="anchor">#</span></a></h2><blockquote><p>The distance to the bottom is set to <code>50px</code> by default, which is overridable.</p><p>If you decide to use custom styles, please note the size limit: no more than <code>40px * 40px</code>.</p></blockquote><table><thead><tr><th>Property</th><th>Description</th><th>Type</th><th>Default</th><th>Version</th></tr></thead><tbody><tr><td>target</td><td>specifies the scrollable area dom node</td><td>() =&gt; HTMLElement</td><td>() =&gt; window</td><td></td></tr><tr><td>visibilityHeight</td><td>the <code>BackTop</code> button will not show until the scroll height reaches this value</td><td>number</td><td>400</td><td></td></tr></tbody></table><h3 id="events">events <a class="header-anchor" href="#events"><span aria-hidden="true" class="anchor">#</span></a></h3><table><thead><tr><th>Events Name</th><th>Description</th><th>Arguments</th><th>Version</th></tr></thead><tbody><tr><td>click</td><td>a callback function, which can be executed when you click the button</td><td>Function</td><td></td></tr></tbody></table>',8)]))}const D=p(W,[["render",j]]),G=v({CN:B,US:D,components:{Basic:C,Custom:Y},setup(){return{}}});function T(u,a,o,c,d,k){const b=e("basic"),m=e("custom"),y=e("demo-sort");return l(),r(y,null,{default:s(()=>[i(b),i(m)]),_:1})}const X=p(G,[["render",T]]);export{X as default};