import{_ as l,G as o,b as e,d as s,p as c,w as t,H as n,i,o as r,f as a,k as u,C as d,S as m}from"./index-2PZN6pGH.js";const p=l({data:()=>({scrollTop:0,old:{scrollTop:0}}),methods:{upper:function(l){console.log(l)},lower:function(l){console.log(l)},scroll:function(l){console.log(l),this.old.scrollTop=l.detail.scrollTop},goTop:function(l){this.scrollTop=this.old.scrollTop,this.$nextTick((function(){this.scrollTop=0})),o({icon:"none",title:"纵向滚动 scrollTop 值已被修改为 0"})}}},[["render",function(l,o,p,f,_,g){const w=e(s("page-head"),n),T=d,S=i,b=m;return r(),c(S,null,{default:t((()=>[a(w,{title:"scroll-view,区域滚动视图"}),a(S,{class:"uni-padding-wrap uni-common-mt"},{default:t((()=>[a(S,{class:"uni-title uni-common-mt"},{default:t((()=>[u(" Vertical Scroll "),a(T,null,{default:t((()=>[u("\\n纵向滚动")])),_:1})])),_:1}),a(S,null,{default:t((()=>[a(b,{"scroll-top":_.scrollTop,"scroll-y":"true",class:"scroll-Y",onScrolltoupper:g.upper,onScrolltolower:g.lower,onScroll:g.scroll},{default:t((()=>[a(S,{id:"demo1",class:"scroll-view-item uni-bg-red"},{default:t((()=>[u("A")])),_:1}),a(S,{id:"demo2",class:"scroll-view-item uni-bg-green"},{default:t((()=>[u("B")])),_:1}),a(S,{id:"demo3",class:"scroll-view-item uni-bg-blue"},{default:t((()=>[u("C")])),_:1})])),_:1},8,["scroll-top","onScrolltoupper","onScrolltolower","onScroll"])])),_:1}),a(S,{onClick:g.goTop,class:"uni-link uni-center uni-common-mt"},{default:t((()=>[u(" 点击这里返回顶部 ")])),_:1},8,["onClick"]),a(S,{class:"uni-title uni-common-mt"},{default:t((()=>[u(" Horizontal Scroll "),a(T,null,{default:t((()=>[u("\\n横向滚动")])),_:1})])),_:1}),a(S,null,{default:t((()=>[a(b,{class:"scroll-view_H","scroll-x":"true",onScroll:g.scroll,"scroll-left":"120"},{default:t((()=>[a(S,{id:"demo1",class:"scroll-view-item_H uni-bg-red"},{default:t((()=>[u("A")])),_:1}),a(S,{id:"demo2",class:"scroll-view-item_H uni-bg-green"},{default:t((()=>[u("B")])),_:1}),a(S,{id:"demo3",class:"scroll-view-item_H uni-bg-blue"},{default:t((()=>[u("C")])),_:1})])),_:1},8,["onScroll"])])),_:1}),a(S,{class:"uni-common-pb"})])),_:1})])),_:1})}],["__scopeId","data-v-9191317f"]]);export{p as default};
