import{_ as l,b as t,d as a,p as e,w as n,H as i,i as u,o as s,f as o,k as c,C as d,P as f,Q as m}from"./index-2PZN6pGH.js";const _=l({data:()=>({x:0,y:0,scale:2,old:{x:0,y:0,scale:2}}),methods:{tap:function(l){this.x=this.old.x,this.y=this.old.y,this.$nextTick((function(){this.x=30,this.y=30}))},tap2(){this.scale=this.old.scale,this.scale=this.old.scale,this.$nextTick((function(){this.scale=3}))},onChange:function(l){this.old.x=l.detail.x,this.old.y=l.detail.y},onScale:function(l){this.old.scale=l.detail.scale}}},[["render",function(l,_,x,r,h,p){const v=t(a("page-head"),i),y=d,b=u,k=f,C=m;return s(),e(b,{class:"page-body"},{default:n((()=>[o(v,{title:"movable-view,可拖动视图"}),o(b,{class:"uni-padding-wrap uni-common-mt"},{default:n((()=>[o(b,{class:"uni-title uni-common-mt"},{default:n((()=>[c(" 示例 1 "),o(y,null,{default:n((()=>[c("\\nmovable-view 区域小于 movable-area")])),_:1})])),_:1}),o(C,null,{default:n((()=>[o(k,{x:h.x,y:h.y,direction:"all",onChange:p.onChange},{default:n((()=>[c("text")])),_:1},8,["x","y","onChange"])])),_:1}),o(b,{onClick:p.tap,class:"uni-link uni-center uni-common-mt"},{default:n((()=>[c(" 点击这里移动至 (30px, 30px) ")])),_:1},8,["onClick"]),o(b,{class:"uni-title uni-common-mt"},{default:n((()=>[c(" 示例 2 "),o(y,null,{default:n((()=>[c("\\nmovable-view区域大于movable-area")])),_:1})])),_:1}),o(C,null,{default:n((()=>[o(k,{class:"max",direction:"all"},{default:n((()=>[c("text")])),_:1})])),_:1}),o(b,{class:"uni-title uni-common-mt"},{default:n((()=>[c(" 示例 3 "),o(y,null,{default:n((()=>[c("\\n只可以横向移动")])),_:1})])),_:1}),o(C,null,{default:n((()=>[o(k,{direction:"horizontal"},{default:n((()=>[c("text")])),_:1})])),_:1}),o(b,{class:"uni-title uni-common-mt"},{default:n((()=>[c(" 示例 4 "),o(y,null,{default:n((()=>[c("\\n只可以纵向移动")])),_:1})])),_:1}),o(C,null,{default:n((()=>[o(k,{direction:"vertical"},{default:n((()=>[c("text")])),_:1})])),_:1}),o(b,{class:"uni-title uni-common-mt"},{default:n((()=>[c(" 示例 5 "),o(y,null,{default:n((()=>[c("\\n可超出边界")])),_:1})])),_:1}),o(C,null,{default:n((()=>[o(k,{direction:"all","out-of-bounds":""},{default:n((()=>[c("text")])),_:1})])),_:1}),o(b,{class:"uni-title uni-common-mt"},{default:n((()=>[c(" 示例 6 "),o(y,null,{default:n((()=>[c("\\n带有惯性")])),_:1})])),_:1}),o(C,null,{default:n((()=>[o(k,{direction:"all",inertia:""},{default:n((()=>[c("text")])),_:1})])),_:1}),o(b,{class:"uni-title uni-common-mt"},{default:n((()=>[c(" 示例 7 "),o(y,null,{default:n((()=>[c("\\n可放缩")])),_:1})])),_:1}),o(C,{"scale-area":""},{default:n((()=>[o(k,{direction:"all",onScale:p.onScale,scale:"","scale-min":"0.5","scale-max":"4","scale-value":h.scale},{default:n((()=>[c("text")])),_:1},8,["onScale","scale-value"])])),_:1}),o(b,{onClick:p.tap2,class:"uni-link uni-center uni-common-mt",style:{"padding-bottom":"80rpx"}},{default:n((()=>[c(" 点击这里放大3倍 ")])),_:1},8,["onClick"])])),_:1})])),_:1})}],["__scopeId","data-v-dce4507f"]]);export{_ as default};
