Browse Source

!80 修复当表单中`.layer-footer`有其他标签时,提交按钮无法工作。
Merge pull request !80 from Vace/master

Vace 6 years ago
parent
commit
3134cb7869
1 changed files with 2 additions and 1 deletions
  1. 2 1
      public/assets/js/fast.js

+ 2 - 1
public/assets/js/fast.js

@@ -206,7 +206,8 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine
                         if ($(this).hasClass("disabled") || $(this).parent().hasClass("disabled")) {
                             return;
                         }
-                        $(".btn:eq(" + $(this).index() + ")", layerfooter).trigger("click");
+                        var index = footer.find('.btn').index(this);
+                        $(".btn:eq(" + index + ")", layerfooter).trigger("click");
                     });
 
                     var titHeight = layero.find('.layui-layer-title').outerHeight() || 0;