如果设置了select2的templateSelection,没做特殊处理的话placeholder会不显示,需要做特殊处理

templateSelection: function(repo){
    if(!repo.id){
        return repo.text;//返回placeholder
    }
    return repo.XXX;//XXX改成你数据的名称
}

相关文章:

  • 2021-06-25
  • 2021-08-04
  • 2022-01-18
  • 2022-12-23
  • 2021-11-10
  • 2021-08-04
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案