如何在同步融合调度程序对话框中仅拖动标题

问题描述 投票:0回答:1

net core C# 同步融合调度程序。

我使调度程序的对话框可拖动

        function OnPopupOpen(args) {

        var dragElement = document.getElementById('schedule_dialog_wrapper');
        var draggable = new ej.base.Draggable(dragElement, { clone: false });

但我只想拖动标题 但我的对话框可以拖动到任何地方...就像这样...

https://drive.google.com/file/d/1obbc0ti8TgWrG6U8A9igqLtxE0fIKMor/view?usp=sharing

dialog modal-dialog drag syncfusion
1个回答
0
投票

您可以通过在 Schedule 的 popupOpen 事件中使用对话框的 allowDragging 属性,仅在拖动对话框标题而不是整个对话框时进行拖动,如下面的共享代码片段所示。

允许拖动UG:https://ej2.syncfusion.com/aspnetcore/documentation/dialog/getting-started#draggable

演示https://ej2.syncfusion.com/aspnetcore/Dialog/Draggable#/ Fluent

function onPopupOpen(args) 
{
    var dialogInstance = document.querySelector(".e-dialog").ej2_instances[0];
    dialogInstance. allowDragging = true;
}
© www.soinside.com 2019 - 2024. All rights reserved.