1
我编写了任何文本,并向我显示与文本不匹配的结果。 无论我在现场插入什么,select2都会始终显示所有结果。Select2显示所有结果
$("#UserCliente").select2({
minimumInputLength: 3,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "../clients/listaclients/",
dataType: 'json',
data: function (term) {
return {
term: term, // search term
};
},
results: function (data) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
});
这是怎么回事?