doc.taro-legacy.d873f7ea.js 1.6 KB

1
  1. System.register(["./vendor-legacy.87645186.js"],(function(t){"use strict";var e,l,n;return{setters:[function(t){e=t.c,l=t.o,n=t.C}],execute:function(){const a={class:"markdown-body"},o=n('<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);t("default",{setup:t=>(t,n)=>(l(),e("div",a,[o]))})}}}));