📅  最后修改于: 2022-03-11 15:02:11.407000             🧑  作者: Mango
var options = [];
$.each(dataReturn, function (i, obj) {
//console.log(i);
//console.log(obj);
options.push({
text: obj.NickName,
id: obj.NickName
});
})
$("#BeneType").empty().select2({
data: options
});