export function switchStringToHtml(inputStr) { let res = inputStr.replace(new RegExp("\n", "gm"), "<br />"); res = res.replace(new RegExp("\r", "gm"), "<br />"); return res; }
export function switchStringToHtml(inputStr) { let res = inputStr.replace(new RegExp("\n", "gm"), "<br />"); res = res.replace(new RegExp("\r", "gm"), "<br />"); return res; }
转载于:https://www.cnblogs.com/zxhome/p/11130731.html