vue.draggable.next (vue 3) 的一些错误

问题描述

我有这个 vue 3 组件任务组的代码

<template>
  <div class="group">
    <div class="group-name">{{model.title}}</div>
    <ul class="task-list slist">
      <draggable
              class="dragArea"
              tag="ul"
              :list="tasks"
              item-key="id">
        <template #item="{ element }">
          <li>
            <p>{{ element.title }}</p>
          </li>
        </template>
      </draggable>
    </ul>
    <AddTaskButton :first="taskList.length===0" @onAddTask="addTask"></AddTaskButton>
  </div>
</template>

当我开始拖动项目时,它会导致许多错误,例如

Uncaught TypeError: Cannot read property 'removeEventListener' of null
    at off (sortable.esm.js?aa47:156)
    at Sortable._onDrop (sortable.esm.js?aa47:2124)
    at Sortable.handleEvent (sortable.esm.js?aa47:2269)

所以它不起作用 P.S 对不起我的英语

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)