{"id":50202,"date":"2025-07-30T21:56:35","date_gmt":"2025-07-30T13:56:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/50202.html"},"modified":"2025-07-30T21:56:35","modified_gmt":"2025-07-30T13:56:35","slug":"%e9%9b%b6%e4%be%9d%e8%b5%96%e6%8b%96%e6%8b%bd%e7%a5%9e%e5%99%a8%ef%bc%9asortablejs-%e5%9c%a8-vue-3-%e4%b8%ad%e7%9a%84%e6%9c%80%e4%bd%b3%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/50202.html","title":{"rendered":"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5"},"content":{"rendered":"<h3>\u7b80\u4ecb<\/h3>\n<p>SortableJS \u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u3001\u8f7b\u91cf\u7ea7\u7684 JavaScript \u62d6\u62fd\u6392\u5e8f\u5e93&#xff0c;\u652f\u6301\u73b0\u4ee3\u6d4f\u89c8\u5668\u548c\u89e6\u6478\u8bbe\u5907\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u914d\u7f6e\u9009\u9879\u548c\u4e8b\u4ef6\u5904\u7406&#xff0c;\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u5217\u8868\u9879\u7684\u62d6\u62fd\u6392\u5e8f\u529f\u80fd\u3002<\/p>\n<h4>\u4e3b\u8981\u7279\u6027<\/h4>\n<ul>\n<li>&#x1f680;\u00a0\u8f7b\u91cf\u7ea7: \u538b\u7f29\u540e\u4ec5\u7ea6 30KB<\/li>\n<li>&#x1f4f1;\u00a0\u89e6\u6478\u652f\u6301: \u5b8c\u7f8e\u652f\u6301\u79fb\u52a8\u8bbe\u5907\u89e6\u6478\u64cd\u4f5c<\/li>\n<li>&#x1f3af;\u00a0\u65e0\u4f9d\u8d56: \u4e0d\u4f9d\u8d56\u4efb\u4f55\u7b2c\u4e09\u65b9\u5e93<\/li>\n<li>&#x1f527;\u00a0\u9ad8\u5ea6\u53ef\u914d\u7f6e: \u4e30\u5bcc\u7684\u914d\u7f6e\u9009\u9879\u548c\u4e8b\u4ef6\u56de\u8c03<\/li>\n<li>&#x1f310;\u00a0\u8de8\u6d4f\u89c8\u5668: \u652f\u6301\u6240\u6709\u73b0\u4ee3\u6d4f\u89c8\u5668<\/li>\n<li>\u267f\u00a0\u53ef\u8bbf\u95ee\u6027: \u652f\u6301\u952e\u76d8\u64cd\u4f5c\u548c\u5c4f\u5e55\u9605\u8bfb\u5668<\/li>\n<\/ul>\n<h3>\u5b89\u88c5<\/h3>\n<p># npm<br \/>\nnpm install sortablejs<\/p>\n<p># yarn<br \/>\nyarn add sortablejs<\/p>\n<p># pnpm<br \/>\npnpm add sortablejs <\/p>\n<h3>Vue 3.js \u57fa\u7840\u4f7f\u7528\u793a\u4f8b<\/h3>\n<h4>1. \u57fa\u672c\u62d6\u62fd\u6392\u5e8f<\/h4>\n<p>&lt;template&gt;<br \/>\n  &lt;div<br \/>\n    class&#061;&#034;min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 py-12 px-4&#034;<br \/>\n  &gt;<br \/>\n    &lt;div class&#061;&#034;max-w-md mx-auto&#034;&gt;<br \/>\n      &lt;h3 class&#061;&#034;text-2xl font-bold text-gray-800 text-center mb-8&#034;&gt;<br \/>\n        \u57fa\u672c\u62d6\u62fd\u6392\u5e8f<br \/>\n      &lt;\/h3&gt;<br \/>\n      &lt;ul ref&#061;&#034;basicList&#034; class&#061;&#034;space-y-3&#034;&gt;<br \/>\n        &lt;li<br \/>\n          v-for&#061;&#034;item in basicItems&#034;<br \/>\n          :key&#061;&#034;item.id&#034;<br \/>\n          class&#061;&#034;bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-200 p-4 cursor-move border border-gray-200 hover:border-blue-300&#034;<br \/>\n        &gt;<br \/>\n          &lt;div class&#061;&#034;flex items-center&#034;&gt;<br \/>\n            &lt;svg<br \/>\n              class&#061;&#034;w-5 h-5 text-gray-400 mr-3&#034;<br \/>\n              fill&#061;&#034;currentColor&#034;<br \/>\n              viewBox&#061;&#034;0 0 20 20&#034;<br \/>\n            &gt;<br \/>\n              &lt;path<br \/>\n                d&#061;&#034;M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z&#034;<br \/>\n              &gt;&lt;\/path&gt;<br \/>\n            &lt;\/svg&gt;<br \/>\n            &lt;span class&#061;&#034;text-gray-700 font-medium&#034;&gt;{{ item.name }}&lt;\/span&gt;<br \/>\n          &lt;\/div&gt;<br \/>\n        &lt;\/li&gt;<br \/>\n      &lt;\/ul&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/template&gt;<\/p>\n<p>&lt;script setup&gt;<br \/>\nimport { ref, onMounted, nextTick } from &#034;vue&#034;;<br \/>\nimport Sortable from &#034;sortablejs&#034;;<\/p>\n<p>const basicList &#061; ref(null);<br \/>\nconst basicItems &#061; ref([<br \/>\n  { id: 1, name: &#034;\u9879\u76ee 1&#034; },<br \/>\n  { id: 2, name: &#034;\u9879\u76ee 2&#034; },<br \/>\n  { id: 3, name: &#034;\u9879\u76ee 3&#034; },<br \/>\n  { id: 4, name: &#034;\u9879\u76ee 4&#034; },<br \/>\n]);<\/p>\n<p>onMounted(() &#061;&gt; {<br \/>\n  nextTick(() &#061;&gt; {<br \/>\n    new Sortable(basicList.value, {<br \/>\n      animation: 150,<br \/>\n      ghostClass: &#034;ghost&#034;,<br \/>\n      chosenClass: &#034;chosen&#034;,<br \/>\n      dragClass: &#034;drag&#034;,<br \/>\n      onEnd: (evt) &#061;&gt; {<br \/>\n        \/\/ \u66f4\u65b0\u6570\u636e\u987a\u5e8f<br \/>\n        const item &#061; basicItems.value.splice(evt.oldIndex, 1)[0];<br \/>\n        basicItems.value.splice(evt.newIndex, 0, item);<br \/>\n      },<br \/>\n    });<br \/>\n  });<br \/>\n});<br \/>\n&lt;\/script&gt;<\/p>\n<p>&lt;style scoped&gt;<br \/>\n.ghost {<br \/>\n  opacity: 0.5;<br \/>\n  background-color: #dbeafe;<br \/>\n  border-color: #93c5fd;<br \/>\n}<\/p>\n<p>.chosen {<br \/>\n  transform: scale(1.05);<br \/>\n  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);<br \/>\n  border-color: #60a5fa;<br \/>\n}<\/p>\n<p>.drag {<br \/>\n  transform: rotate(2deg);<br \/>\n  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);<br \/>\n}<br \/>\n&lt;\/style&gt; <\/p>\n<p class=\"img-center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730135631-688a248f3e7d7.gif\" \/><\/p>\n<h4>2. \u591a\u5217\u8868\u62d6\u62fd<\/h4>\n<p>&lt;template&gt;<br \/>\n  &lt;div class&#061;&#034;min-h-screen bg-gradient-to-br from-slate-50 to-blue-50 p-6&#034;&gt;<br \/>\n    &lt;div class&#061;&#034;max-w-6xl mx-auto&#034;&gt;<br \/>\n      &lt;h3 class&#061;&#034;text-3xl font-bold text-gray-800 text-center mb-8&#034;&gt;<br \/>\n        \u591a\u5217\u8868\u62d6\u62fd\u770b\u677f<br \/>\n      &lt;\/h3&gt;<br \/>\n      &lt;div class&#061;&#034;grid grid-cols-1 md:grid-cols-3 gap-6&#034;&gt;<br \/>\n        &lt;!&#8211; \u5f85\u529e\u4e8b\u9879\u5217 &#8211;&gt;<br \/>\n        &lt;div class&#061;&#034;bg-white rounded-xl shadow-lg p-6 border border-gray-200&#034;&gt;<br \/>\n          &lt;h4<br \/>\n            class&#061;&#034;text-lg font-semibold text-gray-700 text-center mb-4 pb-2 border-b border-gray-200&#034;<br \/>\n          &gt;<br \/>\n            &#x1f4dd; \u5f85\u529e\u4e8b\u9879<br \/>\n          &lt;\/h4&gt;<br \/>\n          &lt;ul<br \/>\n            ref&#061;&#034;todoList&#034;<br \/>\n            class&#061;&#034;space-y-3 min-h-[300px]&#034;<br \/>\n            data-group&#061;&#034;shared&#034;<br \/>\n          &gt;<br \/>\n            &lt;li<br \/>\n              v-for&#061;&#034;item in todoItems&#034;<br \/>\n              :key&#061;&#034;item.id&#034;<br \/>\n              class&#061;&#034;bg-gray-50 border border-gray-200 rounded-lg p-3 cursor-move hover:shadow-md transition-all duration-200 hover:bg-gray-100&#034;<br \/>\n            &gt;<br \/>\n              &lt;div class&#061;&#034;flex items-center&#034;&gt;<br \/>\n                &lt;div class&#061;&#034;w-3 h-3 bg-gray-400 rounded-full mr-3&#034;&gt;&lt;\/div&gt;<br \/>\n                &lt;span class&#061;&#034;text-gray-700&#034;&gt;{{ item.text }}&lt;\/span&gt;<br \/>\n              &lt;\/div&gt;<br \/>\n            &lt;\/li&gt;<br \/>\n          &lt;\/ul&gt;<br \/>\n        &lt;\/div&gt;<\/p>\n<p>        &lt;!&#8211; \u8fdb\u884c\u4e2d\u5217 &#8211;&gt;<br \/>\n        &lt;div class&#061;&#034;bg-white rounded-xl shadow-lg p-6 border border-gray-200&#034;&gt;<br \/>\n          &lt;h4<br \/>\n            class&#061;&#034;text-lg font-semibold text-gray-700 text-center mb-4 pb-2 border-b border-gray-200&#034;<br \/>\n          &gt;<br \/>\n            &#x1f680; \u8fdb\u884c\u4e2d<br \/>\n          &lt;\/h4&gt;<br \/>\n          &lt;ul<br \/>\n            ref&#061;&#034;doingList&#034;<br \/>\n            class&#061;&#034;space-y-3 min-h-[300px]&#034;<br \/>\n            data-group&#061;&#034;shared&#034;<br \/>\n          &gt;<br \/>\n            &lt;li<br \/>\n              v-for&#061;&#034;item in doingItems&#034;<br \/>\n              :key&#061;&#034;item.id&#034;<br \/>\n              class&#061;&#034;bg-orange-50 border border-orange-200 border-l-4 border-l-orange-400 rounded-lg p-3 cursor-move hover:shadow-md transition-all duration-200 hover:bg-orange-100&#034;<br \/>\n            &gt;<br \/>\n              &lt;div class&#061;&#034;flex items-center&#034;&gt;<br \/>\n                &lt;div class&#061;&#034;w-3 h-3 bg-orange-400 rounded-full mr-3&#034;&gt;&lt;\/div&gt;<br \/>\n                &lt;span class&#061;&#034;text-gray-700&#034;&gt;{{ item.text }}&lt;\/span&gt;<br \/>\n              &lt;\/div&gt;<br \/>\n            &lt;\/li&gt;<br \/>\n          &lt;\/ul&gt;<br \/>\n        &lt;\/div&gt;<\/p>\n<p>        &lt;!&#8211; \u5df2\u5b8c\u6210\u5217 &#8211;&gt;<br \/>\n        &lt;div class&#061;&#034;bg-white rounded-xl shadow-lg p-6 border border-gray-200&#034;&gt;<br \/>\n          &lt;h4<br \/>\n            class&#061;&#034;text-lg font-semibold text-gray-700 text-center mb-4 pb-2 border-b border-gray-200&#034;<br \/>\n          &gt;<br \/>\n            \u2705 \u5df2\u5b8c\u6210<br \/>\n          &lt;\/h4&gt;<br \/>\n          &lt;ul<br \/>\n            ref&#061;&#034;doneList&#034;<br \/>\n            class&#061;&#034;space-y-3 min-h-[300px]&#034;<br \/>\n            data-group&#061;&#034;shared&#034;<br \/>\n          &gt;<br \/>\n            &lt;li<br \/>\n              v-for&#061;&#034;item in doneItems&#034;<br \/>\n              :key&#061;&#034;item.id&#034;<br \/>\n              class&#061;&#034;bg-green-50 border border-green-200 border-l-4 border-l-green-500 rounded-lg p-3 cursor-move hover:shadow-md transition-all duration-200 hover:bg-green-100 opacity-80&#034;<br \/>\n            &gt;<br \/>\n              &lt;div class&#061;&#034;flex items-center&#034;&gt;<br \/>\n                &lt;div class&#061;&#034;w-3 h-3 bg-green-500 rounded-full mr-3&#034;&gt;&lt;\/div&gt;<br \/>\n                &lt;span class&#061;&#034;text-gray-700 line-through&#034;&gt;{{ item.text }}&lt;\/span&gt;<br \/>\n              &lt;\/div&gt;<br \/>\n            &lt;\/li&gt;<br \/>\n          &lt;\/ul&gt;<br \/>\n        &lt;\/div&gt;<br \/>\n      &lt;\/div&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/template&gt;<\/p>\n<p>&lt;script setup&gt;<br \/>\nimport { ref, onMounted, nextTick } from &#034;vue&#034;;<br \/>\nimport Sortable from &#034;sortablejs&#034;;<\/p>\n<p>const todoList &#061; ref(null);<br \/>\nconst doingList &#061; ref(null);<br \/>\nconst doneList &#061; ref(null);<\/p>\n<p>const todoItems &#061; ref([<br \/>\n  { id: 1, text: &#034;\u5b66\u4e60 Vue 3&#034; },<br \/>\n  { id: 2, text: &#034;\u5b8c\u6210\u9879\u76ee\u6587\u6863&#034; },<br \/>\n]);<\/p>\n<p>const doingItems &#061; ref([{ id: 3, text: &#034;\u5f00\u53d1\u65b0\u529f\u80fd&#034; }]);<\/p>\n<p>const doneItems &#061; ref([<br \/>\n  { id: 4, text: &#034;\u4fee\u590d Bug&#034; },<br \/>\n  { id: 5, text: &#034;\u4ee3\u7801\u5ba1\u67e5&#034; },<br \/>\n]);<\/p>\n<p>onMounted(() &#061;&gt; {<br \/>\n  nextTick(() &#061;&gt; {<br \/>\n    const sortableOptions &#061; {<br \/>\n      group: &#034;shared&#034;,<br \/>\n      animation: 150,<br \/>\n      ghostClass: &#034;ghost&#034;,<br \/>\n      chosenClass: &#034;chosen&#034;,<br \/>\n      dragClass: &#034;drag&#034;,<br \/>\n      onEnd: (evt) &#061;&gt; {<br \/>\n        const { from, to, oldIndex, newIndex } &#061; evt;<\/p>\n<p>        \/\/ \u83b7\u53d6\u5bf9\u5e94\u7684\u6570\u636e\u6570\u7ec4<br \/>\n        const fromList &#061; getListByElement(from);<br \/>\n        const toList &#061; getListByElement(to);<\/p>\n<p>        if (fromList &amp;&amp; toList) {<br \/>\n          const item &#061; fromList.value.splice(oldIndex, 1)[0];<br \/>\n          toList.value.splice(newIndex, 0, item);<br \/>\n        }<br \/>\n      },<br \/>\n    };<\/p>\n<p>    new Sortable(todoList.value, sortableOptions);<br \/>\n    new Sortable(doingList.value, sortableOptions);<br \/>\n    new Sortable(doneList.value, sortableOptions);<br \/>\n  });<br \/>\n});<\/p>\n<p>function getListByElement(element) {<br \/>\n  if (element &#061;&#061;&#061; todoList.value) return todoItems;<br \/>\n  if (element &#061;&#061;&#061; doingList.value) return doingItems;<br \/>\n  if (element &#061;&#061;&#061; doneList.value) return doneItems;<br \/>\n  return null;<br \/>\n}<br \/>\n&lt;\/script&gt;<\/p>\n<p>&lt;style scoped&gt;<br \/>\n.ghost {<br \/>\n  opacity: 0.5;<br \/>\n  background-color: #dbeafe;<br \/>\n  border-color: #93c5fd;<br \/>\n  transform: rotate(2deg);<br \/>\n}<\/p>\n<p>.chosen {<br \/>\n  transform: scale(1.02);<br \/>\n  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);<br \/>\n  z-index: 10;<br \/>\n}<\/p>\n<p>.drag {<br \/>\n  transform: rotate(3deg) scale(1.05);<br \/>\n  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);<br \/>\n  z-index: 20;<br \/>\n}<br \/>\n&lt;\/style&gt; <\/p>\n<p class=\"img-center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730135632-688a249008156.gif\" \/><\/p>\n<h4>3. \u5e26\u624b\u67c4\u7684\u62d6\u62fd<\/h4>\n<p>&lt;template&gt;<br \/>\n  &lt;div<br \/>\n    class&#061;&#034;min-h-screen bg-gradient-to-br from-purple-50 to-pink-50 py-12 px-4&#034;<br \/>\n  &gt;<br \/>\n    &lt;div class&#061;&#034;max-w-2xl mx-auto&#034;&gt;<br \/>\n      &lt;h3 class&#061;&#034;text-3xl font-bold text-gray-800 text-center mb-8&#034;&gt;<br \/>\n        &#x1f3af; \u5e26\u624b\u67c4\u7684\u62d6\u62fd\u5217\u8868<br \/>\n      &lt;\/h3&gt;<br \/>\n      &lt;ul ref&#061;&#034;handleList&#034; class&#061;&#034;space-y-4&#034;&gt;<br \/>\n        &lt;li<br \/>\n          v-for&#061;&#034;item in handleItems&#034;<br \/>\n          :key&#061;&#034;item.id&#034;<br \/>\n          class&#061;&#034;bg-white rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 border border-gray-200 overflow-hidden group&#034;<br \/>\n        &gt;<br \/>\n          &lt;div class&#061;&#034;flex items-center p-5&#034;&gt;<br \/>\n            &lt;!&#8211; \u62d6\u62fd\u624b\u67c4 &#8211;&gt;<br \/>\n            &lt;div<br \/>\n              class&#061;&#034;drag-handle flex-shrink-0 mr-4 p-2 rounded-lg bg-gray-50 hover:bg-gray-100 transition-colors duration-200 cursor-move&#034;<br \/>\n            &gt;<br \/>\n              &lt;svg<br \/>\n                class&#061;&#034;w-5 h-5 text-gray-400 group-hover:text-gray-600&#034;<br \/>\n                fill&#061;&#034;currentColor&#034;<br \/>\n                viewBox&#061;&#034;0 0 20 20&#034;<br \/>\n              &gt;<br \/>\n                &lt;path<br \/>\n                  d&#061;&#034;M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z&#034;<br \/>\n                &gt;&lt;\/path&gt;<br \/>\n              &lt;\/svg&gt;<br \/>\n            &lt;\/div&gt;<\/p>\n<p>            &lt;!&#8211; \u4efb\u52a1\u5185\u5bb9 &#8211;&gt;<br \/>\n            &lt;div class&#061;&#034;flex-1 min-w-0&#034;&gt;<br \/>\n              &lt;h4 class&#061;&#034;text-lg font-semibold text-gray-800 truncate&#034;&gt;<br \/>\n                {{ item.title }}<br \/>\n              &lt;\/h4&gt;<br \/>\n              &lt;p class&#061;&#034;text-sm text-gray-500 mt-1&#034;&gt;\u62d6\u62fd\u624b\u67c4\u6765\u91cd\u65b0\u6392\u5e8f&lt;\/p&gt;<br \/>\n            &lt;\/div&gt;<\/p>\n<p>            &lt;!&#8211; \u5220\u9664\u6309\u94ae &#8211;&gt;<br \/>\n            &lt;button<br \/>\n              &#064;click&#061;&#034;deleteItem(item.id)&#034;<br \/>\n              class&#061;&#034;flex-shrink-0 ml-4 px-5 py-3 bg-red-500 hover:bg-red-600 text-white text-base font-medium rounded-lg transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 flex items-center whitespace-nowrap&#034;<br \/>\n            &gt;<br \/>\n              &lt;svg<br \/>\n                class&#061;&#034;w-4 h-4 mr-2&#034;<br \/>\n                fill&#061;&#034;none&#034;<br \/>\n                stroke&#061;&#034;currentColor&#034;<br \/>\n                viewBox&#061;&#034;0 0 24 24&#034;<br \/>\n              &gt;<br \/>\n                &lt;path<br \/>\n                  stroke-linecap&#061;&#034;round&#034;<br \/>\n                  stroke-linejoin&#061;&#034;round&#034;<br \/>\n                  stroke-width&#061;&#034;2&#034;<br \/>\n                  d&#061;&#034;M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16&#034;<br \/>\n                &gt;&lt;\/path&gt;<br \/>\n              &lt;\/svg&gt;<br \/>\n              \u5220\u9664<br \/>\n            &lt;\/button&gt;<br \/>\n          &lt;\/div&gt;<br \/>\n        &lt;\/li&gt;<br \/>\n      &lt;\/ul&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/template&gt;<\/p>\n<p>&lt;script setup&gt;<br \/>\nimport { ref, onMounted, nextTick } from &#034;vue&#034;;<br \/>\nimport Sortable from &#034;sortablejs&#034;;<\/p>\n<p>const handleList &#061; ref(null);<br \/>\nconst handleItems &#061; ref([<br \/>\n  { id: 1, title: &#034;\u91cd\u8981\u4efb\u52a1 1&#034; },<br \/>\n  { id: 2, title: &#034;\u91cd\u8981\u4efb\u52a1 2&#034; },<br \/>\n  { id: 3, title: &#034;\u91cd\u8981\u4efb\u52a1 3&#034; },<br \/>\n  { id: 4, title: &#034;\u91cd\u8981\u4efb\u52a1 4&#034; },<br \/>\n]);<\/p>\n<p>onMounted(() &#061;&gt; {<br \/>\n  nextTick(() &#061;&gt; {<br \/>\n    new Sortable(handleList.value, {<br \/>\n      handle: &#034;.drag-handle&#034;,<br \/>\n      animation: 200,<br \/>\n      ghostClass: &#034;ghost&#034;,<br \/>\n      chosenClass: &#034;chosen&#034;,<br \/>\n      dragClass: &#034;drag&#034;,<br \/>\n      onEnd: (evt) &#061;&gt; {<br \/>\n        const item &#061; handleItems.value.splice(evt.oldIndex, 1)[0];<br \/>\n        handleItems.value.splice(evt.newIndex, 0, item);<br \/>\n      },<br \/>\n    });<br \/>\n  });<br \/>\n});<\/p>\n<p>function deleteItem(id) {<br \/>\n  const index &#061; handleItems.value.findIndex((item) &#061;&gt; item.id &#061;&#061;&#061; id);<br \/>\n  if (index &gt; -1) {<br \/>\n    handleItems.value.splice(index, 1);<br \/>\n  }<br \/>\n}<br \/>\n&lt;\/script&gt;<\/p>\n<p>&lt;style scoped&gt;<br \/>\n.ghost {<br \/>\n  opacity: 0.5;<br \/>\n  background-color: #f3e8ff;<br \/>\n  border-color: #c084fc;<br \/>\n  transform: rotate(1deg);<br \/>\n}<\/p>\n<p>.chosen {<br \/>\n  transform: scale(1.02);<br \/>\n  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);<br \/>\n  z-index: 10;<br \/>\n}<\/p>\n<p>.drag {<br \/>\n  transform: rotate(2deg) scale(1.05);<br \/>\n  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);<br \/>\n  z-index: 20;<br \/>\n}<br \/>\n&lt;\/style&gt; <\/p>\n<p class=\"img-center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730135633-688a24915087b.gif\" \/><\/p>\n<h3>\u5e38\u7528\u914d\u7f6e\u9009\u9879<\/h3>\n<table>\n<tr>\u9009\u9879\u7c7b\u578b\u9ed8\u8ba4\u503c\u63cf\u8ff0<\/tr>\n<tbody>\n<tr>\n<td>group<\/td>\n<td>String\/Object<\/td>\n<td>null<\/td>\n<td>\u5206\u7ec4\u540d\u79f0&#xff0c;\u7528\u4e8e\u591a\u5217\u8868\u62d6\u62fd<\/td>\n<\/tr>\n<tr>\n<td>sort<\/td>\n<td>Boolean<\/td>\n<td>true<\/td>\n<td>\u662f\u5426\u5141\u8bb8\u6392\u5e8f<\/td>\n<\/tr>\n<tr>\n<td>disabled<\/td>\n<td>Boolean<\/td>\n<td>false<\/td>\n<td>\u662f\u5426\u7981\u7528\u62d6\u62fd<\/td>\n<\/tr>\n<tr>\n<td>animation<\/td>\n<td>Number<\/td>\n<td>0<\/td>\n<td>\u52a8\u753b\u6301\u7eed\u65f6\u95f4&#xff08;\u6beb\u79d2&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>handle<\/td>\n<td>String<\/td>\n<td>null<\/td>\n<td>\u62d6\u62fd\u624b\u67c4\u9009\u62e9\u5668<\/td>\n<\/tr>\n<tr>\n<td>filter<\/td>\n<td>String<\/td>\n<td>null<\/td>\n<td>\u8fc7\u6ee4\u4e0d\u53ef\u62d6\u62fd\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td>ghostClass<\/td>\n<td>String<\/td>\n<td>sortable-ghost<\/td>\n<td>\u62d6\u62fd\u65f6\u7684\u5e7d\u7075\u5143\u7d20\u6837\u5f0f\u7c7b<\/td>\n<\/tr>\n<tr>\n<td>chosenClass<\/td>\n<td>String<\/td>\n<td>sortable-chosen<\/td>\n<td>\u9009\u4e2d\u5143\u7d20\u7684\u6837\u5f0f\u7c7b<\/td>\n<\/tr>\n<tr>\n<td>dragClass<\/td>\n<td>String<\/td>\n<td>sortable-drag<\/td>\n<td>\u62d6\u62fd\u5143\u7d20\u7684\u6837\u5f0f\u7c7b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5e38\u7528\u4e8b\u4ef6<\/h3>\n<table>\n<tr>\u4e8b\u4ef6\u63cf\u8ff0\u53c2\u6570<\/tr>\n<tbody>\n<tr>\n<td>onStart<\/td>\n<td>\u5f00\u59cb\u62d6\u62fd\u65f6\u89e6\u53d1<\/td>\n<td>evt<\/td>\n<\/tr>\n<tr>\n<td>onEnd<\/td>\n<td>\u62d6\u62fd\u7ed3\u675f\u65f6\u89e6\u53d1<\/td>\n<td>evt<\/td>\n<\/tr>\n<tr>\n<td>onAdd<\/td>\n<td>\u5143\u7d20\u6dfb\u52a0\u5230\u5217\u8868\u65f6\u89e6\u53d1<\/td>\n<td>evt<\/td>\n<\/tr>\n<tr>\n<td>onUpdate<\/td>\n<td>\u5217\u8868\u5185\u5143\u7d20\u987a\u5e8f\u66f4\u65b0\u65f6\u89e6\u53d1<\/td>\n<td>evt<\/td>\n<\/tr>\n<tr>\n<td>onRemove<\/td>\n<td>\u5143\u7d20\u4ece\u5217\u8868\u79fb\u9664\u65f6\u89e6\u53d1<\/td>\n<td>evt<\/td>\n<\/tr>\n<tr>\n<td>onSort<\/td>\n<td>\u4efb\u4f55\u6392\u5e8f\u53d8\u5316\u65f6\u89e6\u53d1<\/td>\n<td>evt<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u6700\u4f73\u5b9e\u8df5<\/h3>\n<li>\u6027\u80fd\u4f18\u5316: \u5bf9\u4e8e\u5927\u91cf\u6570\u636e&#xff0c;\u8003\u8651\u4f7f\u7528\u865a\u62df\u6eda\u52a8<\/li>\n<li>\u6570\u636e\u540c\u6b65: \u53ca\u65f6\u66f4\u65b0 Vue \u7684\u54cd\u5e94\u5f0f\u6570\u636e<\/li>\n<li>\u7528\u6237\u4f53\u9a8c: \u6dfb\u52a0\u9002\u5f53\u7684\u52a8\u753b\u548c\u89c6\u89c9\u53cd\u9988<\/li>\n<li>\u79fb\u52a8\u7aef\u9002\u914d: \u6d4b\u8bd5\u89e6\u6478\u8bbe\u5907\u7684\u62d6\u62fd\u4f53\u9a8c<\/li>\n<li>\u53ef\u8bbf\u95ee\u6027: \u63d0\u4f9b\u952e\u76d8\u64cd\u4f5c\u652f\u6301<\/li>\n<h3>\u603b\u7ed3<\/h3>\n<p>SortableJS \u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u4e14\u6613\u4e8e\u4f7f\u7528\u7684\u62d6\u62fd\u6392\u5e8f\u5e93&#xff0c;\u4e0e Vue 3 \u7ed3\u5408\u4f7f\u7528\u53ef\u4ee5\u5feb\u901f\u5b9e\u73b0\u5404\u79cd\u62d6\u62fd\u6392\u5e8f\u9700\u6c42\u3002\u901a\u8fc7\u5408\u7406\u7684\u914d\u7f6e\u548c\u4e8b\u4ef6\u5904\u7406&#xff0c;\u53ef\u4ee5\u521b\u5efa\u51fa\u7528\u6237\u4f53\u9a8c\u826f\u597d\u7684\u4ea4\u4e92\u754c\u9762\u3002<\/p>\n<p>\u00a0\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668&#xff1a;SortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5 &#8211; \u9ad8\u8d28\u91cf\u6e90\u7801\u5206\u4eab\u5e73\u53f0-\u514d\u8d39\u4e0b\u8f7d\u5404\u7c7b\u7f51\u7ad9\u6e90\u7801\u4e0e\u6a21\u677f\u53ca\u524d\u6cbf\u6280\u672f\u5206\u4eab<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb526\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf8\u6b21\u3002SortableJS\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7JavaScript\u62d6\u62fd\u6392\u5e8f\u5e93\uff0c\u5b8c\u7f8e\u652f\u6301Vue3\u9879\u76ee\u5f00\u53d1\u3002\u5176\u4e3b\u8981\u7279\u70b9\u5305\u62ec\uff1a30KB\u8f7b\u91cf\u4f53\u79ef\u3001\u8de8\u6d4f\u89c8\u5668\u517c\u5bb9\u3001\u89e6\u6478\u8bbe\u5907\u652f\u6301\u548c\u65e0\u969c\u788d\u8bbf\u95ee\u3002\u672c\u6587\u901a\u8fc73\u4e2a\u5178\u578b\u793a\u4f8b\u6f14\u793a\u4e86SortableJS\u7684\u6838\u5fc3\u7528\u6cd5\uff1a1)\u57fa\u7840\u5217\u8868\u62d6\u62fd\u6392\u5e8f\u5b9e\u73b0\uff1b2)\u591a\u5217\u8868\u770b\u677f\u5f0f\u62d6\u62fd\uff1b3)\u5e26\u624b\u67c4\u63a7\u5236\u7684\u62d6\u62fd\u7ec4\u4ef6\u3002\u6587\u7ae0\u8fd8\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5e38\u7528\u914d\u7f6e\u9009\u9879\u548c\u4e8b\u4ef6\u56de\u8c03\uff0c\u5e76\u63d0\u4f9b\u4e86\u6700\u4f73\u5b9e\u8df5\u5efa\u8bae\uff0c\u5982\u6027\u80fd\u4f18\u5316\u3001\u6570\u636e\u540c\u6b65\u548c\u79fb\u52a8\u7aef\u9002\u914d\u7b49\u3002SortableJS\u51ed\u501f\u5176\u96f6\u4f9d\u8d56\u3001\u9ad8\u5b9a\u5236\u5316\u7684\u7279\u70b9\uff0c\u80fd\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u6784\u5efa\u6d41\u7545\u7684\u62d6\u62fd\u4ea4\u4e92\u4f53\u9a8c\u3002<\/p>\n","protected":false},"author":2,"featured_media":50199,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[684,187,4885,4883,625,87,4882,4884],"topic":[],"class_list":{"0":"post-50202","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-vue3","9":"tag-javascript","11":"tag-sortablejs","12":"tag-vue-js","13":"tag-87","14":"tag-4882","15":"tag-4884"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/50202.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb526\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf8\u6b21\u3002SortableJS\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7JavaScript\u62d6\u62fd\u6392\u5e8f\u5e93\uff0c\u5b8c\u7f8e\u652f\u6301Vue3\u9879\u76ee\u5f00\u53d1\u3002\u5176\u4e3b\u8981\u7279\u70b9\u5305\u62ec\uff1a30KB\u8f7b\u91cf\u4f53\u79ef\u3001\u8de8\u6d4f\u89c8\u5668\u517c\u5bb9\u3001\u89e6\u6478\u8bbe\u5907\u652f\u6301\u548c\u65e0\u969c\u788d\u8bbf\u95ee\u3002\u672c\u6587\u901a\u8fc73\u4e2a\u5178\u578b\u793a\u4f8b\u6f14\u793a\u4e86SortableJS\u7684\u6838\u5fc3\u7528\u6cd5\uff1a1)\u57fa\u7840\u5217\u8868\u62d6\u62fd\u6392\u5e8f\u5b9e\u73b0\uff1b2)\u591a\u5217\u8868\u770b\u677f\u5f0f\u62d6\u62fd\uff1b3)\u5e26\u624b\u67c4\u63a7\u5236\u7684\u62d6\u62fd\u7ec4\u4ef6\u3002\u6587\u7ae0\u8fd8\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5e38\u7528\u914d\u7f6e\u9009\u9879\u548c\u4e8b\u4ef6\u56de\u8c03\uff0c\u5e76\u63d0\u4f9b\u4e86\u6700\u4f73\u5b9e\u8df5\u5efa\u8bae\uff0c\u5982\u6027\u80fd\u4f18\u5316\u3001\u6570\u636e\u540c\u6b65\u548c\u79fb\u52a8\u7aef\u9002\u914d\u7b49\u3002SortableJS\u51ed\u501f\u5176\u96f6\u4f9d\u8d56\u3001\u9ad8\u5b9a\u5236\u5316\u7684\u7279\u70b9\uff0c\u80fd\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u6784\u5efa\u6d41\u7545\u7684\u62d6\u62fd\u4ea4\u4e92\u4f53\u9a8c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/50202.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-30T13:56:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730135631-688a248f3e7d7.gif\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/50202.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/50202.html\",\"name\":\"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-30T13:56:35+00:00\",\"dateModified\":\"2025-07-30T13:56:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/50202.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/50202.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/50202.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/50202.html","og_locale":"zh_CN","og_type":"article","og_title":"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb526\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf8\u6b21\u3002SortableJS\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7JavaScript\u62d6\u62fd\u6392\u5e8f\u5e93\uff0c\u5b8c\u7f8e\u652f\u6301Vue3\u9879\u76ee\u5f00\u53d1\u3002\u5176\u4e3b\u8981\u7279\u70b9\u5305\u62ec\uff1a30KB\u8f7b\u91cf\u4f53\u79ef\u3001\u8de8\u6d4f\u89c8\u5668\u517c\u5bb9\u3001\u89e6\u6478\u8bbe\u5907\u652f\u6301\u548c\u65e0\u969c\u788d\u8bbf\u95ee\u3002\u672c\u6587\u901a\u8fc73\u4e2a\u5178\u578b\u793a\u4f8b\u6f14\u793a\u4e86SortableJS\u7684\u6838\u5fc3\u7528\u6cd5\uff1a1)\u57fa\u7840\u5217\u8868\u62d6\u62fd\u6392\u5e8f\u5b9e\u73b0\uff1b2)\u591a\u5217\u8868\u770b\u677f\u5f0f\u62d6\u62fd\uff1b3)\u5e26\u624b\u67c4\u63a7\u5236\u7684\u62d6\u62fd\u7ec4\u4ef6\u3002\u6587\u7ae0\u8fd8\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5e38\u7528\u914d\u7f6e\u9009\u9879\u548c\u4e8b\u4ef6\u56de\u8c03\uff0c\u5e76\u63d0\u4f9b\u4e86\u6700\u4f73\u5b9e\u8df5\u5efa\u8bae\uff0c\u5982\u6027\u80fd\u4f18\u5316\u3001\u6570\u636e\u540c\u6b65\u548c\u79fb\u52a8\u7aef\u9002\u914d\u7b49\u3002SortableJS\u51ed\u501f\u5176\u96f6\u4f9d\u8d56\u3001\u9ad8\u5b9a\u5236\u5316\u7684\u7279\u70b9\uff0c\u80fd\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u6784\u5efa\u6d41\u7545\u7684\u62d6\u62fd\u4ea4\u4e92\u4f53\u9a8c\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/50202.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-30T13:56:35+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730135631-688a248f3e7d7.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/50202.html","url":"https:\/\/www.wsisp.com\/helps\/50202.html","name":"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-30T13:56:35+00:00","dateModified":"2025-07-30T13:56:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/50202.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/50202.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/50202.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u96f6\u4f9d\u8d56\u62d6\u62fd\u795e\u5668\uff1aSortableJS \u5728 Vue 3 \u4e2d\u7684\u6700\u4f73\u5b9e\u8df5"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/50202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=50202"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/50202\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/50199"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=50202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=50202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=50202"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=50202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}