select2 ajax 远程获取下拉框默认显示数据, 无需输入

	$("#domain_user").select2({
		placeholder : '请选择',
		minimumInputLength : 1, //默认最少输入1位
		language : "zh-CN",
		width : "137px",
		allowClear : true,
		ajax : {
			type : "post",
			url : "tudstat/getUserData",
			dataType : 'json',
			delay : 250,
			data : function(params) {
minimumInputLength   参数

删掉该参数就默认会查询数据了,不需要输入值查询


猜你喜欢

转载自blog.csdn.net/chenzhenguo123/article/details/80236701