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

pull/136/head
deng-cc 2019-09-30 11:47:46 +08:00
parent 81ec67d4ea
commit 1166be1ea0
1 changed files with 5 additions and 1 deletions

View File

@ -1353,7 +1353,11 @@
formToJSON: function(formId) {
var json = {};
$.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;
}