doc.taro.46f9de69.js 1.5 KB

1
  1. import{e as t,o as e,G as l}from"./vendor.21cda21c.js";const a={class:"markdown-body"},o=[l('<h1>Drag 拖拽</h1><h3>介绍</h3><p>实现可拖拽的任意元素</p><h3>安装</h3><pre><code class="language-javascript">import { createApp } from &#39;vue&#39;;\nimport { Drag } from &#39;@nutui/nutui&#39;;\n\nconst app = createApp();\napp.use(Drag);\n</code></pre><h2>基本用法</h2><pre><code class="language-html">&lt;nut-drag&gt;\n &lt;div class=&quot;touch-dom&quot;&gt;可点击,可拖拽&lt;/div&gt;\n&lt;/nut-drag&gt;\n</code></pre><h2>限制拖拽方向</h2><pre><code class="language-html">&lt;nut-drag direction=&quot;x&quot;&gt;\n &lt;div class=&quot;touch-dom&quot;&gt;只能在X轴拖动&lt;/div&gt;\n&lt;/nut-drag&gt;\n</code></pre><h2>限制拖拽方向</h2><pre><code class="language-html">&lt;nut-drag direction=&quot;y&quot;&gt;\n &lt;div class=&quot;touch-dom&quot;&gt;只能在Y轴拖动&lt;/div&gt;\n&lt;/nut-drag&gt;\n</code></pre><h2>Prop</h2><table><thead><tr><th style="text-align:left;">字段</th><th style="text-align:left;">说明</th><th style="text-align:left;">类型</th><th style="text-align:left;">默认值</th></tr></thead><tbody><tr><td style="text-align:left;">direction</td><td style="text-align:left;">拖拽元素的拖拽方向限制,<strong>x</strong>/<strong>y</strong>/<strong>all</strong>三选一</td><td style="text-align:left;">String</td><td style="text-align:left;">‘all’</td></tr></tbody></table>',13)],n={setup:l=>(l,n)=>(e(),t("div",a,o))};export{n as default};