Browse Source

拖动弹窗功能

laiguoran 6 years ago
parent
commit
0fb12c74dd
3 changed files with 16627 additions and 2 deletions
  1. 8 1
      app/public/js/global.js
  2. 16617 0
      app/public/js/jquery/jquery-ui.js
  3. 2 1
      config/web.js

+ 8 - 1
app/public/js/global.js

@@ -82,6 +82,13 @@ $(function(){
         $("#save-form").submit();
     });
 
+    // modal弹窗拖动
+    $(document).on("show.bs.modal", ".modal", function() {
+        $(this).draggable({
+            handle: ".modal-header"   // 只能点击头部拖动
+        });
+        $(this).css("overflow", "hidden");
+    });
 });
 
 /**
@@ -293,4 +300,4 @@ function removeLocalCache(key) {
         return null;
     }
     return storage.removeItem(key);
-}
+}

File diff suppressed because it is too large
+ 16617 - 0
app/public/js/jquery/jquery-ui.js


+ 2 - 1
config/web.js

@@ -35,6 +35,7 @@ const JsFiles = {
     webPath: "/public/js/web/",
     commonFiles: [
         "/public/js/jquery/jquery-3.2.1.min.js",
+        "/public/js/jquery/jquery-ui.js",
         "/public/js/jquery/jquery.validate.js",
         "/public/js/messages_zh.js",
         "/public/js/popper/popper.min.js",
@@ -188,4 +189,4 @@ const JsFiles = {
 
 };
 
-module.exports = JsFiles;
+module.exports = JsFiles;