在html中可以直接使用换行,但是小程序wxml中使用无效,可以换成\n Page({ data: { title:'至少5个字\n请多说些感受吧'} })<text>{{title}}</text> 一定要注意,text中\n才能生效,view里边直接写\n不行 string=string.replace(/\r\n/g,"\n");string=string.replace(/\n/g,"\n");...
view 中使用 \n 设置一个 white-space: pre 可以换行。但是使用 data 动态设置 <view>{{message}}<...