【问题标题】:Vue.Draggable : Use component inside draggable transition-groupVue.Draggable:在可拖动过渡组中使用组件
【发布时间】:2023-01-11 16:25:24
【问题描述】:

我在尝试使用 Vue.Draggable 库时遇到问题。我想在保留过渡组的同时在我的可拖动对象中使用一个组件。它在没有过渡组的情况下工作,但每当我添加带有动画名称的过渡组标签时,它就不再工作了。我的组件元素没有显示,我有这个错误:

TypeError: Cannot set properties of null (setting '__draggable_context')

这是我的代码:

      <draggable :list="teams" item-key="idteam" tag="transition-group" :component-data="{name:'fade'}>
        <template #item="{ element, index }">
          <my-team :id="element.idteam" :name="element.teamName" :index="index">
          </my-team
        ></template>
      </draggable>

知道我怎样才能让所有的人一起工作吗? 谢谢你的帮助

【问题讨论】:

    标签: vue.js vuejs3 sortablejs vuedraggable


    【解决方案1】:

    你需要添加 :animation="200",而不仅仅是添加 tag="transition-group" 希望对你有帮助

    【讨论】:

      猜你喜欢
      • 2019-07-31
      • 2019-02-01
      • 2010-11-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-03
      • 2018-06-16
      • 1970-01-01
      相关资源
      最近更新 更多