| 1 |
- import{c as t}from"./mobile.418609e7.js";import{B as e,C as o,r as a,o as r,e as l,j as p,k as i,g as n,l as d}from"./vendor.f7062dc0.js";import"./index.b4cbfe18.js";const{createDemo:s}=t("drag");var u=s({setup:()=>({right:function(){return document.documentElement.clientWidth-300-9},bottom:function(){return document.documentElement.clientHeight-559}})});e("data-v-725c58ea");const c={class:"demo full"},f=n("h2",null,"基础用法",-1),m=d("触摸移动"),y=n("h2",{style:{top:"30px",position:"relative"}},"限制拖拽方向",-1),x=d("只能X轴拖拽"),_=d("只能Y轴拖拽"),b=n("h2",{style:{top:"60px",position:"relative"}},"自动吸边",-1),h=d("拖动我"),g=n("h2",{style:{top:"90px",position:"relative"}},"限制拖动边界",-1),v=n("div",{class:"drag-boundary"},null,-1),j=d("限制拖拽边界");o(),u.render=function(t,e,o,n,d,s){const u=a("nut-button"),E=a("nut-drag");return r(),l("div",c,[f,p(E,{style:{top:"120px",left:"8px"}},{default:i((()=>[p(u,{type:"primary"},{default:i((()=>[m])),_:1})])),_:1}),y,p(E,{direction:"x",style:{top:"200px",left:"8px"}},{default:i((()=>[p(u,{type:"primary"},{default:i((()=>[x])),_:1})])),_:1}),p(E,{direction:"y",style:{top:"200px",right:"50px"}},{default:i((()=>[p(u,{type:"primary"},{default:i((()=>[_])),_:1})])),_:1}),b,p(E,{direction:"x",attract:!0,style:{top:"275px",left:"8px"}},{default:i((()=>[p(u,{type:"primary"},{default:i((()=>[h])),_:1})])),_:1}),g,v,p(E,{boundary:{top:361,left:9,bottom:t.bottom(),right:t.right()},style:{top:"400px",left:"50px"}},{default:i((()=>[p(u,{type:"primary"},{default:i((()=>[j])),_:1})])),_:1},8,["boundary"])])},u.__scopeId="data-v-725c58ea";export{u as default};
|