动态赋值
var str = '';
for (var i = 0; i < response.data.id_with_codes.length; i++){
str += '<option value="'+ response.data.id_with_codes[i][0] +'">'+ response.data.id_with_codes[i][1] +'</option>'
}
// 将动态拼接的数据渲染
$('#waterfall-is-rules').html(str);
// 刷新
$('#waterfall-is-rules').selectpicker('refresh');
赋默认值
$('#waterfall-is-rules').selectpicker('val', response.data.cash.entry_type);