Replace the <br/> tag with\n
Use the css property: white-space:pre-wrap
for example:
<view style="white-space:pre-wrap">
Text preserves spaces and carriage returns
</view>
Article source: Liu Juntao's blog
Welcome to pay attention, if you have any questions to learn together, please leave a message and comment
Reprinted in: https://www.cnblogs.com/lovebing/p/10621999.html