方法1 用pre标签展示
<pre v-html>
    
</pre>

方法2 浏览器处理换行的时候,会进行自动合并
(1)设置 white-space: pre,禁用自动合并;
(2) 可选-》 consentText.replace(/\n/g, '<br>')

  

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
  • 2021-12-18
  • 2022-12-23
猜你喜欢
  • 2022-02-02
  • 2021-06-08
  • 2021-11-22
  • 2021-06-19
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案