vue字符串换行

  • vue 中 用 {{}}  进行数据绑定的时候,如果我么你想让字符串换行是不生效的

  • 解决办法,不用上边的方式进行数据绑定,用v-html标签代替{{}}
 this.curRowSendTlxContent=row.sendtlxinfo.replace(/\n/g,"<br/>")

 

发布了139 篇原创文章 · 获赞 13 · 访问量 9294

猜你喜欢

转载自blog.csdn.net/qq_18671415/article/details/103974606