在网上搜了很多,<br/>、<pre>...</pre>都不管用,其实就是替换成'\n'就可以了 let str = 'text,文本,Englist'; let result = str..replaceAll(',', '\n');