text: import{r as c,o as r,b as _,a5 as n,w as d,a9 as e,c as h,X as t,bc as y}from"./vendor.dce3d09c.js";import{_ as f}from"./index.4e4a0526.js";const g=e("Offset top 120px"),p={setup(i){const a=({scrollTop:o,fixed:l})=>{console.log("scrollTop",o,"fixed",l)};return(o,l)=>{const x=c("fz-button"),s=c("fz-affix");return r(),_("div",null,[n(s,{offset:120},{default:d(()=>[n(x,{type:"primary",onScroll:a},{default:d(()=>[g]),_:1})]),_:1})])}}};const m={},u={class:"affix-container"},b=e("Target container");function B(i,a){const o=c("fz-button"),l=c("fz-affix");return r(),_("div",u,[n(l,{target:".affix-container",offset:80},{default:d(()=>[n(o,{type:"primary"},{default:d(()=>[b]),_:1})]),_:1})])}var E=f(m,[["render",B]]);const A={},v=e("Offset bottom 20px");function z(i,a){const o=c("fz-button"),l=c("fz-affix");return r(),h(l,{position:"bottom",offset:20},{default:d(()=>[n(o,{type:"primary"},{default:d(()=>[v]),_:1})]),_:1})}var $=f(A,[["render",z]]);const w={class:"markdown-body"},S=t("h1",{id:"%E5%9B%BA%E9%92%89",tabindex:"-1"},"\u56FA\u9489",-1),k=t("p",null,"\u5C06\u9875\u9762\u5143\u7D20\u56FA\u5B9A\u5728\u7279\u5B9A\u53EF\u89C6\u533A\u57DF",-1),C=t("h2",{id:"%E5%9F%BA%E7%A1%80%E7%94%A8%E6%B3%95",tabindex:"-1"},"\u57FA\u7840\u7528\u6CD5",-1),D=t("p",null,"\u56FA\u9489\u9ED8\u8BA4\u56FA\u5B9A\u5728\u9875\u9762\u9876\u90E8\u3002",-1),N=t("p",null,[e("\u901A\u8FC7\u8BBE\u7F6E "),t("code",null,"offset"),e(" \u5C5E\u6027\u6765\u6539\u53D8\u5438\u9876\u8DDD\u79BB\uFF0C\u9ED8\u8BA4\u503C\u4E3A 0\u3002")],-1),V=t("h2",{id:"%E4%B8%BA-affix-%E7%BB%84%E4%BB%B6%E6%8C%87%E5%AE%9A%E5%AE%B9%E5%99%A8",tabindex:"-1"},"\u4E3A Affix \u7EC4\u4EF6\u6307\u5B9A\u5BB9\u5668",-1),T=t("p",null,[e("\u901A\u8FC7\u8BBE\u7F6E "),t("code",null,"target"),e(" \u5C5E\u6027\uFF0C\u8BA9\u56FA\u9489\u59CB\u7EC8\u4FDD\u6301\u5728\u5BB9\u5668\u5185\uFF0C \u8D85\u8FC7\u8303\u56F4\u5219\u9690\u85CF\u3002")],-1),j=t("p",null,"\u8BF7\u6CE8\u610F\u5BB9\u5668\u907F\u514D\u51FA\u73B0\u6EDA\u52A8\u6761\u3002",-1),F=t("h2",{id:"%E5%9B%BA%E5%AE%9A-affix-%E7%BB%84%E4%BB%B6%E7%9A%84%E4%BD%8D%E7%BD%AE",tabindex:"-1"},"\u56FA\u5B9A Affix \u7EC4\u4EF6\u7684\u4F4D\u7F6E",-1),O=t("p",null,[e("Affix \u7EC4\u4EF6\u63D0\u4F9B 2 \u4E2A\u56FA\u5B9A\u7684\u4F4D\u7F6E\u53C2\u6570 "),t("code",null,"top"),e(" \u548C "),t("code",null,"bottom\u3002")],-1),X=t("p",null,[e("\u901A\u8FC7\u8BBE\u7F6E "),t("code",null,"position"),e(" \u5C5E\u6027\u6765\u6539\u53D8\u56FA\u5B9A\u4F4D\u7F6E\uFF0C\u9ED8\u8BA4\u503C\u4E3A "),t("code",null,"top"),e(" \u3002")],-1),q=y('<h2 id="%E5%B1%9E%E6%80%A7" tabindex="-1">\u5C5E\u6027</h2><div class="doc-table"><table><thead><tr><th style="text-align:center;">\u53C2\u6570</th><th style="text-align:center;">\u8BF4\u660E</th><th style="text-align:center;">\u7C7B\u578B</th><th style="text-align:center;">\u53EF\u9009\u503C</th><th style="text-align:center;">\u9ED8\u8BA4\u503C</th><th style="text-align:center;">\u662F\u5426\u5FC5\u586B</th></tr></thead><tbody><tr><td style="text-align:center;"><code>offset</code></td><td style="text-align:center;">\u504F\u79FB\u8DDD\u79BB</td><td style="text-align:center;">number</td><td style="text-align:center;">-</td><td style="text-align:center;">0</td><td style="text-align:center;">\u5426</td></tr><tr><td style="text-align:center;"><code>position</code></td><td style="text-align:center;">\u56FA\u9489\u4F4D\u7F6E</td><td style="text-align:center;">string</td><td style="text-align:center;"><code>top/bottom</code></td><td style="text-align:center;"><code>top</code></td><td style="text-align:center;">\u5426</td></tr><tr><td style="text-align:center;"><code>target</code></td><td style="text-align:center;">\u6307\u5B9A\u5BB9\u5668\uFF08CSS \u9009\u62E9\u5668\uFF09</td><td style="text-align:center;">string</td><td style="text-align:center;">-</td><td style="text-align:center;">-</td><td style="text-align:center;">\u5426</td></tr><tr><td style="text-align:center;"><code>z-index</code></td><td style="text-align:center;">\u56FA\u9489\u5C42\u7EA7</td><td style="text-align:center;">string/number</td><td style="text-align:center;">-</td><td style="text-align:center;">100</td><td style="text-align:center;">\u5426</td></tr></tbody></table></div><h2 id="%E4%BA%8B%E4%BB%B6" tabindex="-1">\u4E8B\u4EF6</h2><div class="doc-table"><table><thead><tr><th style="text-align:center;">\u4E8B\u4EF6\u540D</th><th style="text-align:center;">\u8BF4\u660E</th><th style="text-align:center;">\u53C2\u6570\u5217\u8868</th><th style="text-align:center;">\u53C2\u6570\u8BF4\u660E</th></tr></thead><tbody><tr><td style="text-align:center;"><code>change</code></td><td style="text-align:center;">\u56FA\u9489\u72B6\u6001\u6539\u53D8\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6</td><td style="text-align:center;">[value: boolean]</td><td style="text-align:center;">\u662F\u5426\u6539\u53D8</td></tr><tr><td style="text-align:center;"><code>scroll</code></td><td style="text-align:center;">\u6EDA\u52A8\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6</td><td style="text-align:center;">[top: number, fixed: boolean]</td><td style="text-align:center;">top\uFF1Ascroll top\uFF1Bfixed\uFF1Afixed \u72B6\u6001</td></tr></tbody></table></div><h2 id="%E6%96%B9%E6%B3%95" tabindex="-1">\u65B9\u6CD5</h2><div class="doc-table"><table><thead><tr><th style="text-align:center;">\u65B9\u6CD5\u540D</th><th style="text-align:center;">\u8BF4\u660E</th><th style="text-align:center;">\u53C2\u6570\u5217\u8868</th><th style="text-align:center;">\u53C2\u6570\u8BF4\u660E</th></tr></thead><tbody><tr><td style="text-align:center;"><code>update</code></td><td style="text-align:center;">\u624B\u52A8\u66F4\u65B0\u56FA\u9489\u72B6\u6001</td><td style="text-align:center;">-</td><td style="text-align:center;">-</td></tr></tbody></table></div><h2 id="%E6%8F%92%E6%A7%BD" tabindex="-1">\u63D2\u69FD</h2><div class="doc-table"><table><thead><tr><th style="text-align:center;">\u63D2\u69FD\u540D</th><th style="text-align:center;">\u8BF4\u660E</th></tr></thead><tbody><tr><td style="text-align:center;"><code>default</code></td><td style="text-align:center;">\u81EA\u5B9A\u4E49\u9ED8\u8BA4\u5185\u5BB9</td></tr></tbody></table></div>',8),I={setup(i,{expose:a}){return a({frontmatter:{}}),(l,x)=>{const s=c("demo-preview");return r(),_("div",w,[S,k,C,D,N,n(s,{"comp-name":"Affix","demo-name":"demo"},{default:d(()=>[n(p)]),_:1}),V,T,j,n(s,{"comp-name":"Affix","demo-name":"demo2"},{default:d(()=>[n(E)]),_:1}),F,O,X,n(s,{"comp-name":"Affix","demo-name":"demo3"},{default:d(()=>[n($)]),_:1}),q])}}};export{I as default};
  