From d37a36778b44c057fdc5f39ad9383f3f23c62612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sat, 28 Jan 2023 22:07:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20form=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=B0=BE=E9=83=A8=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/form.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/form.js b/src/modules/form.js index f33927dc..9fa7e87f 100644 --- a/src/modules/form.js +++ b/src/modules/form.js @@ -915,16 +915,17 @@ layui.define(['lay', 'layer', 'util'], function(exports){ // 事件 return layui.event.call(this, MOD_NAME, 'submit('+ layFilter +')', params); }; - - // 自动完成渲染 - var form = new Form() - ,$dom = $(document), $win = $(window); + var form = new Form(); + var $dom = $(document); + var $win = $(window); + + // 初始自动完成渲染 $(function(){ form.render(); }); - // 表单reset重置渲染 + // 表单 reset 重置渲染 $dom.on('reset', ELEM, function(){ var filter = $(this).attr('lay-filter'); setTimeout(function(){