fix:修复optgroup标签多选后值转json后丢失的问题

dep_wangsr
deng-cc 5 years ago committed by Limy
parent 1b213b425f
commit 7f0e8c6164

@ -1353,7 +1353,11 @@
formToJSON: function(formId) { formToJSON: function(formId) {
var json = {}; var json = {};
$.each($("#" + formId).serializeArray(), function(i, field) { $.each($("#" + formId).serializeArray(), function(i, field) {
json[field.name] = field.value; if(json[field.name]) {
json[field.name] += ("," + field.value);
} else {
json[field.name] = field.value;
}
}); });
return json; return json;
} }

Loading…
Cancel
Save