Layer弹窗后首先关闭获取焦点,防止回车弹出多个

This commit is contained in:
thinkgem
2023-11-22 11:13:54 +08:00
parent dc6f361891
commit 20d2cd7408

View File

@@ -710,6 +710,7 @@ Class.pt.callback = function(){
var that = this, layero = that.layero, config = that.config;
that.openLayer();
if(config.success){
layero.find('.layui-layer-close').focus(); // 弹窗后首先关闭获取焦点,防止回车弹出多个
if(config.type == 2){
layero.find('iframe').on('load', function(){
config.success(layero, that.index);