<el-table :data="tableData" border show-summary style="width: 100%" fit>
<el-table-column prop="pp" label="序号" width="50" align="center"></el-table-column>
<el-table-column prop="cp" label="计算过程" width="180"></el-table-column>
</el-table>
cp = '100'+'*'+pp1.toFixed(2)+'%*'+dp1.toString()+'%'+"\n";
cp+= "+\n"+(500-100)+'*'+pp2.toFixed(2)+'%*'+dp2.toString()+'%'+'\n';
cp+= '+\n'+(1000-500).toString()+'*'+pp3.toFixed(2)+'%*'+dp3.toString()+'%'+'\n';
cp+= '+\n'+(5000-1000).toString()+'*'+pp4.toFixed(2)+'%*'+dp4.toString()+'%'+'\n';
cp+= '+\n'+(10000-5000).toString()+'*'+pp5.toFixed(2)+'%*'+dp5.toString()+'%'+'\n';
cp+= '+\n'+(100000-10000).toString()+'*'+pp6.toFixed(2)+'%*'+dp6.toString()+'%'+'\n';
cp+= '+\n'+(item-100000).toString()+'*'+pp7.toFixed(2)+'%*'+dp7.toString()+'%';
var sp = {pp:index+1,cp:cp}
this.tableData.push(sp)
想让 cp 单元格内的内容从\n 标记处换行,但在 chrome 下调试好后在 手机端 ios 的微信浏览器 中不起作用,使用了好多方法都不行,求前端高人解惑指导 谢谢!