import{_ as p,j as o,k as l,l as d,w as a,f as i,e as n,b as t,a as g,n as h,d as v}from"./index.c1b9962e.js";const I={};function x(u,s){const e=o("a-back-top"),c=o("demo-box");return l(),d(c,{jsfiddle:{us:"The simplest usage.",cn:"\u6700\u7B80\u5355\u7684\u7528\u6CD5\u3002",docHtml:`
zh-CN
\u6700\u7B80\u5355\u7684\u7528\u6CD5\u3002
en-US
The simplest usage.
`,order:0,title:{"zh-CN":"\u57FA\u672C\u4F7F\u7528","en-US":"Basic Usage"},relativePath:"src/docs/back-top/demo/basic.vue",sourceCode:"PHRlbXBsYXRlPgogIDxhLWJhY2stdG9wIC8+CiAgU2Nyb2xsIGRvd24gdG8gc2VlIHRoZSBib3R0b20tcmlnaHQKICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogcmdiYSg2NCwgNjQsIDY0LCAwLjYpIj5ncmF5PC9zdHJvbmc+CiAgYnV0dG9uLgo8L3RlbXBsYXRlPgoKCg==",jsSourceCode:"PHRlbXBsYXRlPgogIDxhLWJhY2stdG9wIC8+CiAgU2Nyb2xsIGRvd24gdG8gc2VlIHRoZSBib3R0b20tcmlnaHQKICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogcmdiYSg2NCwgNjQsIDY0LCAwLjYpIj5ncmF5PC9zdHJvbmc+CiAgYnV0dG9uLgo8L3RlbXBsYXRlPg=="}},{default:a(()=>[i(e),s[0]||(s[0]=n(" Scroll down to see the bottom-right ")),s[1]||(s[1]=t("strong",{style:{color:"rgba(64, 64, 64, 0.6)"}},"gray",-1)),s[2]||(s[2]=n(" button. "))]),htmlCode:a(()=>s[3]||(s[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:a(()=>s[4]||(s[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})}var C=p(I,[["render",x]]);const w={},Y={id:"components-back-top-demo-custom"};function f(u,s){const e=o("a-back-top"),c=o("demo-box");return l(),d(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:`zh-CN
\u53EF\u4EE5\u81EA\u5B9A\u4E49\u56DE\u5230\u9876\u90E8\u6309\u94AE\u7684\u6837\u5F0F\uFF0C\u9650\u5236\u5BBD\u9AD8\uFF1A40px * 40px
\u3002
en-US
You can customize the style of the button, just note the size limit: no more than 40px * 40px
.
`,order:1,title:{"zh-CN":"\u81EA\u5B9A\u4E49\u6837\u5F0F","en-US":"Custom style"},relativePath:"src/docs/back-top/demo/custom.vue",sourceCode:"PHRlbXBsYXRlPgogIDxkaXYgaWQ9ImNvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20iPgogICAgPGEtYmFjay10b3A+CiAgICAgIDxkaXYgY2xhc3M9ImFudC1iYWNrLXRvcC1pbm5lciI+VVA8L2Rpdj4KICAgIDwvYS1iYWNrLXRvcD4KICAgIFNjcm9sbCBkb3duIHRvIHNlZSB0aGUgYm90dG9tLXJpZ2h0CiAgICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogIzEwODhlOSI+Ymx1ZTwvc3Ryb25nPgogICAgYnV0dG9uLgogIDwvZGl2Pgo8L3RlbXBsYXRlPgoKPHN0eWxlIHNjb3BlZD4KI2NvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20gLmFudC1iYWNrLXRvcCB7CiAgYm90dG9tOiAxMDBweDsKfQojY29tcG9uZW50cy1iYWNrLXRvcC1kZW1vLWN1c3RvbSAuYW50LWJhY2stdG9wLWlubmVyIHsKICBoZWlnaHQ6IDQwcHg7CiAgd2lkdGg6IDQwcHg7CiAgbGluZS1oZWlnaHQ6IDQwcHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIGJhY2tncm91bmQtY29sb3I6ICMxMDg4ZTk7CiAgY29sb3I6ICNmZmY7CiAgdGV4dC1hbGlnbjogY2VudGVyOwogIGZvbnQtc2l6ZTogMjBweDsKfQo8L3N0eWxlPgo=",jsSourceCode:"PHRlbXBsYXRlPgogIDxkaXYgaWQ9ImNvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20iPgogICAgPGEtYmFjay10b3A+CiAgICAgIDxkaXYgY2xhc3M9ImFudC1iYWNrLXRvcC1pbm5lciI+VVA8L2Rpdj4KICAgIDwvYS1iYWNrLXRvcD4KICAgIFNjcm9sbCBkb3duIHRvIHNlZSB0aGUgYm90dG9tLXJpZ2h0CiAgICA8c3Ryb25nIHN0eWxlPSJjb2xvcjogIzEwODhlOSI+Ymx1ZTwvc3Ryb25nPgogICAgYnV0dG9uLgogIDwvZGl2Pgo8L3RlbXBsYXRlPgoKPHN0eWxlIHNjb3BlZD4KI2NvbXBvbmVudHMtYmFjay10b3AtZGVtby1jdXN0b20gLmFudC1iYWNrLXRvcCB7CiAgYm90dG9tOiAxMDBweDsKfQojY29tcG9uZW50cy1iYWNrLXRvcC1kZW1vLWN1c3RvbSAuYW50LWJhY2stdG9wLWlubmVyIHsKICBoZWlnaHQ6IDQwcHg7CiAgd2lkdGg6IDQwcHg7CiAgbGluZS1oZWlnaHQ6IDQwcHg7CiAgYm9yZGVyLXJhZGl1czogNHB4OwogIGJhY2tncm91bmQtY29sb3I6ICMxMDg4ZTk7CiAgY29sb3I6ICNmZmY7CiAgdGV4dC1hbGlnbjogY2VudGVyOwogIGZvbnQtc2l6ZTogMjBweDsKfQo8L3N0eWxlPg=="}},{default:a(()=>[t("div",Y,[i(e,null,{default:a(()=>s[0]||(s[0]=[t("div",{class:"ant-back-top-inner"},"UP",-1)])),_:1,__:[0]}),s[1]||(s[1]=n(" Scroll down to see the bottom-right ")),s[2]||(s[2]=t("strong",{style:{color:"#1088e9"}},"blue",-1)),s[3]||(s[3]=n(" button. "))])]),htmlCode:a(()=>s[4]||(s[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:a(()=>s[5]||(s[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})}var A=p(w,[["render",f],["__scopeId","data-v-172513ea"]]);const 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:"src/docs/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:`\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 |
|
`,lastUpdated:1748059052613}},H={class:"markdown"};function B(u,s,e,c,k,r){return l(),g("article",H,s[0]||(s[0]=[h('\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 | |
',8)]))}var _=p(N,[["render",B]]);const j={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:"src/docs/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:`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 |
|
`,lastUpdated:1748059052612}},P={class:"markdown"};function D(u,s,e,c,k,r){return l(),g("article",P,s[0]||(s[0]=[h('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 | |
',8)]))}var G=p(j,[["render",D]]);const W=v({CN:_,US:G,components:{Basic:C,Custom:A},setup(){return{}}});function R(u,s,e,c,k,r){const b=o("basic"),m=o("custom"),y=o("demo-sort");return l(),d(y,null,{default:a(()=>[i(b),i(m)]),_:1})}var L=p(W,[["render",R]]);export{L as default};