一般js中\n就可以换行
uni.showModal({
title: '更新提示',
content: "1.实名认证\n2.自动检测更新\n3.细节优化",
success: function (resp) {
if (resp.confirm) {
}
}
})
如果是在data中的数据,\n无效的话,可以这样
data{
return{
text:'1.实名认证\n2.自动检测更新\n3.细节优化'
}
}
<view style="white-space: pre-wrap">{{ text }}</view>