比如服务端返回的数据是 str = “这是一句话,需要两行展示” let str = "这是一句话,需要两行展示" let arr = str. split(',') 然后遍历得到的arr中的item即可