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-BRTtls-l.js";import{P as $}from"./index-BxgvQLkr.js";import{_ as g}from"./index-CYriLmQo.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-DOuVMe-q.js";import"./index-CxQILSKV.js";import"./index-ByLO0zSl.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-DtBiGC0g.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./useContentViewHeight-D71xl1HH.js";import"./usePageContext-CCgh0KDo.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};
