需要重新更新渲染下select下拉框
使用 form.render(‘select‘);
$.ajax({ url:url, contentType:"application/json;charset=UTF-8", type:‘GET‘, async:false, success: function (res) { let data=res.results, str1=`<option value="">请选择资产</option>`; data.map((item,index)=>{ console.log(item) str1+=`<option value="${item.id}">${item.name}</option>` }) $("#quiz2").html(str1); console.log(data); form.render(‘select‘); }, beforeSend:function(xhr){// xhr.setRequestHeader("Authorization",iotAuthorization); xhr.setRequestHeader("X-SiteWhere-Tenant",iotTenant); } });