LayUI延时关闭iframe
-
Layui延时执行刷新或关闭弹窗的正确写法
搜索了很多人的解答,但基本都是这样写的:
1234567layer.msg(d.msg, {icon: 1,time: 3000,shade: 0.4}, function () {location.href = "{:url('admin/index')}"});但是,这样写很可能执行不到,建议这样写:
1234567891011done: function(res){layer.msg(res.msg, {time: 2000,end: function () {console.log('updated');console.log('close');parent.layer.close(index);parent.location.reload();}});}