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-CYoRlduV.js";import{P as $}from"./index-CRgSyMPH.js";import{_ as g}from"./index-Cy4uayzW.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-DYB8Ashr.js";import"./index-Bdn0r8CG.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-XU-h1taH.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./useContentViewHeight-Qm4QNm5l.js";import"./usePageContext-CXQdt-5h.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};
