The string from the back end has line breaks:
The effect of direct output:
Solution demo:
<p class="" v-html="text"></p>
js:
let str=res.rows[0].text.replace(/\n/g,"<br/>")
this.text = str
effect: