微信小程序wx.showModal模态对话框中content换行
2022-12-09 本文已影响0人
hao_developer
image.png
解决方案:使用“\r\n”换行
wx.showModal({
title: 'showModal换行',
content: '姓名:JIM\r\n性别:女\r\n国籍:中国',
success(res) {
if (res.confirm) {
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})