(js)去除字符串里的\n 去除前: 去除后: let aa = model.label.replace(/\n/g, ""); alert(aa); 解决参考:https://www.cnblogs.com/henuyuxiang/p/15165801.html