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

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

@@ -1488,13 +1488,17 @@ function checkbox()
 				$(this).unbind('click').bind('click', function()
 				{
 					var next = $(this).next();
-					
+					var state = $(this).attr('data-state');
 					if($(this).get(0).checked == true)
 					{
-						if ($("." + name + "-" + self.val()+":checked").length >= len) {
+						if (state == 2) {
 							self.get(0).checked = true;
+						} else {
+							if ($("." + name + "-" + self.val()+":checked").length >= len) {
+								self.get(0).checked = true;
+							}
 						}
-						
+
 						if(self.attr('type') == 'radio')
 						{
 							//如果父选项是radio类型,做下限制
@@ -1539,7 +1543,9 @@ function checkbox()
 							$("#mul_type").val(0);
 						}
 
-						if (!$('#' + id).length) {
+						if (state == 2) {
+
+						} else if (!$('#' + id).length) {
 							self.parent().append('<input type="hidden" value="0" id="'+id+'" name="'+hidden+'" />');
 						}
 					} else {