【问题标题】:Attributes "draggable" and "resizable" don't working on JQuery UI Dialog属性“可拖动”和“可调整大小”不适用于 JQuery UI 对话框
【发布时间】:2017-08-14 09:55:54
【问题描述】:

我正在使用此代码使用 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');

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

【问题讨论】:

    标签: jquery-ui jquery-ui-dialog


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2014-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多