浏览代码

优化前台弹窗宽高

Karson 2 年之前
父节点
当前提交
0fb7924420
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      public/assets/js/frontend/user.js

+ 2 - 2
public/assets/js/frontend/user.js

@@ -26,7 +26,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
                 Layer.open({
                     type: 1,
                     title: __('Reset password'),
-                    area: ["450px", "355px"],
+                    area: [$(window).width() < 450 ? ($(window).width() - 10) + "px" : "450px", "355px"],
                     content: content,
                     success: function (layero) {
                         var rule = $("#resetpwd-form input[name='captcha']").data("rule");
@@ -85,7 +85,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
                 Layer.open({
                     type: 1,
                     title: "修改",
-                    area: ["400px", "250px"],
+                    area: [$(window).width() < 450 ? ($(window).width() - 10) + "px" : "450px", "355px"],
                     content: content,
                     success: function (layero) {
                         var form = $("form", layero);