CdkDropList 输入已弃用 CdkDropList 中不存在 [英] CdkDropList enter deprecated not exists in CdkDropList

查看:16
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆