dever 3 年之前
父节点
当前提交
2a3980e737
共有 1 个文件被更改,包括 10 次插入10 次删除
  1. 10 10
      assets/lib/manage/main.js

+ 10 - 10
assets/lib/manage/main.js

@@ -2043,25 +2043,25 @@ function showAlert(msg, func, title, index, t)
 		config.area = '800px';
 	}
 
+	config.cancel = config.btn2 = function(index)
+	{
+		layer.close(index);
+	};
+
 	if (func) {
 		config.yes = function(index)
 		{
 			func(index);
 		};
 	} else {
-		config.yes = function(index)
-		{
-			$('.layui-layer-content').css('overflow-x', 'auto');
-			$('#update_button').show();
-			layer.close(index);
-		};
+		config.yes = config.cancel;
 	}
-	config.btn2 = function(index)
-	{
+
+	config.end = function() {
 		$('.layui-layer-content').css('overflow-x', 'auto');
 		$('#update_button').show();
-		layer.close(index);
-	};
+	}
+	
 	var index = layer.open(config);
 }