属性“draggable”和“resizable”不适用于JQuery UI Dialog

时间:2021-06-11 20:38:29

I'm use this code for open dialog window using jquery dialog:

我使用jquery对话框将此代码用于打开对话框窗口:

       var page = "{{env('APP_URL')}}/reports/dep33";
       var $dialog = $('<div style="overflow:hidden"></div>')
                                    .html('<iframe style="border: 0px; " src="' + page + '?id=' + gr + '" width="100%" height="100%" ></iframe>')
                                    .dialog({
                                        dialogClass: "no-close",
                                        autoOpen: false,
                                        modal: true,
                                        height: 400,
                                        width: "40%",
                                        draggable: true,
                                        resizable: true
                                        buttons: [{
                                text: "Close",
                                click: function () {
                                $("#list").trigger("reloadGrid", [{current: true}]);
                                $(this).dialog("close");
                                          }
                                         },
                                       ],
                                        title: "Fast Report",

                                    });
                            $dialog.dialog('open');

Attributes like Width,Height, Modal working fine, but attributes draggable and resizable don't working. Why? The console does not show any errors.

宽度,高度,模态等属性工作正常,但属性可拖动和可调整大小不起作用。为什么?控制台不显示任何错误。

1 个解决方案

#1


0  

Ensure you are including the correct css. I had this problem with regard to the resizable behaviour and it was a case of our project was selectively including the different css files and the resizable.css file wasn't included at first.

确保包含正确的CSS。关于可调整大小的行为,我遇到了这个问题,我们的项目是有选择地包括不同的css文件的情况,并且首先不包括resizable.css文件。

#1


0  

Ensure you are including the correct css. I had this problem with regard to the resizable behaviour and it was a case of our project was selectively including the different css files and the resizable.css file wasn't included at first.

确保包含正确的CSS。关于可调整大小的行为,我遇到了这个问题,我们的项目是有选择地包括不同的css文件的情况,并且首先不包括resizable.css文件。