<th
data-options="field:'type',width:90,sortable:true,formatter:typesFormatter,
editor:{
type:'combobox',
options:{
valueField:'id',
textField:'name',
data:types,
editable:false,
required:true
}

}">类型</th>

easy ui下拉框combobox如何填充数据

"field:'type'是和数据库表中的匹配的字段名称一致

easy ui下拉框combobox如何填充数据

valueField:'id',   

textField:'name',

data:types,       data是用什么数组填充

required:true   是否必填

跟我们定义的type数组是键值对的, valueField是实际存入数据库的值,textField是我们显示的值


easy ui下拉框combobox如何填充数据

③根据自己的需要填写,如果需要格式化则需要填写,如不希望显示的是数据库的英文字段,而是我们显示中文意识,则需要格式化

相关文章:

  • 2022-12-23
  • 2021-12-09
  • 2021-04-15
  • 2022-12-23
  • 2022-01-04
  • 2021-09-23
  • 2022-12-23
  • 2022-02-15
猜你喜欢
  • 2021-11-12
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-07-15
相关资源
相似解决方案