import{d as E,f as A,u as C,U as p,a2 as c,ad as F,af as s,a4 as u,k as e,G as a,a3 as _,ae as k,a5 as D,F as v}from"./vue-vendor-CxLCUzY4.js";import{S as B}from"./index-Dz2zbQB_.js";import{P as $}from"./index-DaObvZxT.js";import{_ as g}from"./index-B_2CoVdl.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-exs4VcBw.js";import"./index-DAURrYyA.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-BWLGvKEC.js";import"./useWindowSizeFn-C3WExEpc.js";import"./useContentViewHeight-DlpfApuB.js";import"./usePageContext-HMYqek-Q.js";import"./injectionKey-DPVn4AgL.js";const S=E({components:{ScrollContainer:B,PageWrapper:$},setup(){const t=A(null),o=()=>{const l=C(t);if(!l)throw new Error("scroll is Null");return l};function i(l){o().scrollTo(l)}function m(){o().scrollBottom()}return{scrollTo:i,scrollRef:t,scrollBottom:m}}}),T={class:"my-4"},b={class:"scroll-wrap"},w={class:"p-3"};function y(t,o,i,m,l,N){const n=p("a-button"),f=p("ScrollContainer"),d=p("PageWrapper");return c(),F(d,{title:"滚动组件函数示例",content:"基于el-scrollbar"},{default:s(()=>[u("div",T,[e(n,{onClick:o[0]||(o[0]=r=>t.scrollTo(100)),class:"mr-2"},{default:s(()=>o[4]||(o[4]=[a(" 滚动到100px位置 ")])),_:1}),e(n,{onClick:o[1]||(o[1]=r=>t.scrollTo(800)),class:"mr-2"},{default:s(()=>o[5]||(o[5]=[a(" 滚动到800px位置 ")])),_:1}),e(n,{onClick:o[2]||(o[2]=r=>t.scrollTo(0)),class:"mr-2"},{default:s(()=>o[6]||(o[6]=[a(" 滚动到顶部 ")])),_:1}),e(n,{onClick:o[3]||(o[3]=r=>t.scrollBottom()),class:"mr-2"},{default:s(()=>o[7]||(o[7]=[a(" 滚动到底部 ")])),_:1})]),u("div",b,[e(f,{class:"mt-4",ref:"scrollRef"},{default:s(()=>[u("ul",w,[(c(),_(v,null,k(100,r=>u("li",{key:r,class:"p-2",style:{border:"1px solid #eee"}},D(r),1)),64))])]),_:1},512)])]),_:1})}const O=g(S,[["render",y],["__scopeId","data-v-981521f7"]]);export{O as default};
