123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- 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">
- <span aria-hidden="true" class="anchor">#</span>
- </a></h2>
- <p>\u6700\u7B80\u5355\u7684\u7528\u6CD5\u3002</p>
- <h2 id="en-US">en-US <a class="header-anchor" href="#en-US">
- <span aria-hidden="true" class="anchor">#</span>
- </a></h2>
- <p>The simplest usage.</p>
- `,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(`
- `),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(`
- Scroll down to see the bottom-right
- `),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(`
- button.
- `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
- `)])],-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(`
- `),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(`
- Scroll down to see the bottom-right
- `),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(`
- button.
- `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
- `)])],-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">
- <span aria-hidden="true" class="anchor">#</span>
- </a></h2>
- <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>
- <h2 id="en-US">en-US <a class="header-anchor" href="#en-US">
- <span aria-hidden="true" class="anchor">#</span>
- </a></h2>
- <p>You can customize the style of the button, just note the size limit: no more than <code>40px * 40px</code>.</p>
- `,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(`
- `),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(`
- `),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(`
- `),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(`
- `),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(`
- Scroll down to see the bottom-right
- `),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(`
- button.
- `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("div")]),t("span",{class:"token punctuation"},">")]),n(`
- `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
- `),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(`
- `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top"),n(),t("span",{class:"token punctuation"},"{"),n(`
- `),t("span",{class:"token property"},"bottom"),t("span",{class:"token punctuation"},":"),n(" 100px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token punctuation"},"}"),n(`
- `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top-inner"),n(),t("span",{class:"token punctuation"},"{"),n(`
- `),t("span",{class:"token property"},"height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"width"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"line-height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"border-radius"),t("span",{class:"token punctuation"},":"),n(" 4px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"background-color"),t("span",{class:"token punctuation"},":"),n(" #1088e9"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(" #fff"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"text-align"),t("span",{class:"token punctuation"},":"),n(" center"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"font-size"),t("span",{class:"token punctuation"},":"),n(" 20px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token punctuation"},"}"),n(`
- `)])]),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("style")]),t("span",{class:"token punctuation"},">")]),n(`
- `)])],-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(`
- `),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(`
- `),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(`
- `),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(`
- `),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(`
- Scroll down to see the bottom-right
- `),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(`
- button.
- `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("div")]),t("span",{class:"token punctuation"},">")]),n(`
- `),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("template")]),t("span",{class:"token punctuation"},">")]),n(`
- `),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(`
- `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top"),n(),t("span",{class:"token punctuation"},"{"),n(`
- `),t("span",{class:"token property"},"bottom"),t("span",{class:"token punctuation"},":"),n(" 100px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token punctuation"},"}"),n(`
- `),t("span",{class:"token selector"},"#components-back-top-demo-custom .ant-back-top-inner"),n(),t("span",{class:"token punctuation"},"{"),n(`
- `),t("span",{class:"token property"},"height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"width"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"line-height"),t("span",{class:"token punctuation"},":"),n(" 40px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"border-radius"),t("span",{class:"token punctuation"},":"),n(" 4px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"background-color"),t("span",{class:"token punctuation"},":"),n(" #1088e9"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"color"),t("span",{class:"token punctuation"},":"),n(" #fff"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"text-align"),t("span",{class:"token punctuation"},":"),n(" center"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token property"},"font-size"),t("span",{class:"token punctuation"},":"),n(" 20px"),t("span",{class:"token punctuation"},";"),n(`
- `),t("span",{class:"token punctuation"},"}"),n(`
- `)])]),t("span",{class:"token tag"},[t("span",{class:"token tag"},[t("span",{class:"token punctuation"},"</"),n("style")]),t("span",{class:"token punctuation"},">")]),n(`
- `)])],-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:`
- \u8FD4\u56DE\u9875\u9762\u9876\u90E8\u7684\u64CD\u4F5C\u6309\u94AE\u3002
- ## \u4F55\u65F6\u4F7F\u7528
- - \u5F53\u9875\u9762\u5185\u5BB9\u533A\u57DF\u6BD4\u8F83\u957F\u65F6\uFF1B
- - \u5F53\u7528\u6237\u9700\u8981\u9891\u7E41\u8FD4\u56DE\u9876\u90E8\u67E5\u770B\u76F8\u5173\u5185\u5BB9\u65F6\u3002
- ## API
- > \u6709\u9ED8\u8BA4\u6837\u5F0F\uFF0C\u8DDD\u79BB\u5E95\u90E8 \`50px\`\uFF0C\u53EF\u8986\u76D6\u3002
- >
- > \u81EA\u5B9A\u4E49\u6837\u5F0F\u5BBD\u9AD8\u4E0D\u5927\u4E8E 40px \\* 40px\u3002
- | \u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u9ED8\u8BA4\u503C | \u7248\u672C |
- | --- | --- | --- | --- | --- |
- | 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 | () => window | |
- | visibilityHeight | \u6EDA\u52A8\u9AD8\u5EA6\u8FBE\u5230\u6B64\u53C2\u6570\u503C\u624D\u51FA\u73B0 \`BackTop\` | number | 400 | |
- ### \u4E8B\u4EF6
- | \u4E8B\u4EF6\u540D\u79F0 | \u8BF4\u660E | \u56DE\u8C03\u53C2\u6570 | \u7248\u672C |
- | -------- | ------------------ | -------- | ---- |
- | click | \u70B9\u51FB\u6309\u94AE\u7684\u56DE\u8C03\u51FD\u6570 | Function | |
- `,html:`<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>() => 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>
- `,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>() => 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:`
- \`BackTop\` makes it easy to go back to the top of the page.
- ## When To Use
- - When the page content is very long.
- - When you need to go back to the top very frequently in order to view the contents.
- ## API
- > The distance to the bottom is set to \`50px\` by default, which is overridable.
- >
- > If you decide to use custom styles, please note the size limit: no more than \`40px * 40px\`.
- | Property | Description | Type | Default | Version |
- | --- | --- | --- | --- | --- |
- | target | specifies the scrollable area dom node | () => HTMLElement | () => window | |
- | visibilityHeight | the \`BackTop\` button will not show until the scroll height reaches this value | number | 400 | |
- ### events
- | Events Name | Description | Arguments | Version |
- | --- | --- | --- | --- |
- | click | a callback function, which can be executed when you click the button | Function | |
- `,html:`<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>() => HTMLElement</td>
- <td>() => 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>
- `,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>() => HTMLElement</td><td>() => 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};
|