代码:
set: function () { Form.api.bindevent($("form[role=form]"), function () {}, function () {}, function (success, error) { layer.confirm('请仔细核对比例,避免比例出错!', { btn: ['确定', '取消'] //按钮 }, function (index) { Form.api.submit($("form[role=form]"), function (data, ret) { //如果我们需要在提交表单成功后做跳转,可以在此使用location.href="链接";进行跳转 setTimeout(function () { parent.Layer.close(parent.Layer.getFrameIndex(window.name)); }, 1000); }); Layer.close(index); }, function () { }); return false; }); // Controller.api.bindevent(); },
用到的是:
//为表单绑定事件,将自动绑定上传/富文本/下拉框/selectpage/表单验证等功能,FastAdmin中最常用的方法, Form.api.bindevent(form, success, error, submit); //提交表单的方法,在表单完成验证后进行提交 Form.api.submit(form, success, error, submit);
标签:function,前加,form,submit,表单,api,fastadmin,弹框,Form From: https://www.cnblogs.com/zhangzhijian/p/17036413.html