CdkDropList输入已弃用,CdkDropList中不存在 [英] CdkDropList enter deprecated not exists in CdkDropList
本文介绍了CdkDropList输入已弃用,CdkDropList中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
完成对Angular Material 10的更新后,我遇到了拖放指令的问题。 enter
,在 cdkDropList
中不再存在,因此我的代码
After doing the update to Angular Material 10 I got a problem with drag&drop directive. enter
, in cdkDropList
doesn't exists anymore and so my code
this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
不起作用。我试图找出解决方案,但没有成功。这是不推荐使用的 enter
函数 https://stackblitz.com/edit/angular-dragdrop-grid-pnyded
谁能帮我解决这个问题?非常感谢
not working. I tried to find out a solution but without success. That's an example with the deprecated enter
function https://stackblitz.com/edit/angular-dragdrop-grid-pnyded
can anyone help me to fix this? Thanks a lot
推荐答案
我遇到了同样的问题,并使用以下命令解决了该问题:
I had the same problem, and fixed it with:
this.placeholder._dropListRef.enter(drag._dragRef,
drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
这篇关于CdkDropList输入已弃用,CdkDropList中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文