首页 新闻 赞助 找找看

blazor cannot get the drop data.

0
悬赏园豆:5 [待解决问题]
        protected virtual void OnDrop(DragEventArgs args)
        {
            if (!IRootParent.Current.AsType<IEditable>().IsEditable) return;
            Console.WriteLine($"{this.GetType().Name},{this.Id},{new StackFrame(0).GetMethod()}");
            Console.WriteLine(args.DataTransfer.Types.FirstOrDefault());
            //Console.WriteLine(args.DataTransfer.Items.FirstOrDefault().Kind);
            IsAcceptDropState = false;
        }

未知如何可以接收到 drop 参数值?

调试显示DataTransfer.Items均为null.

like.

https://github.com/dotnet/aspnetcore/issues/25721

花飘水流兮的主页 花飘水流兮 | 专家六级 | 园豆:13560
提问于:2021-09-26 10:11
< >
分享
所有回答(2)
-1

先打印 args 的值试一下

人间春风意 | 园豆:2335 (老鸟四级) | 2021-09-26 11:54
0

预计目前版本或无解。

花飘水流兮 | 园豆:13560 (专家六级) | 2021-09-28 10:54
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册