How to wrap the content in the WeChat applet showModal

Add \r\n where a line break is required to wrap the content.

Note: WeChat developer tools cannot see

wx.showModal({
    title: '标题',
    content: '这是一段文字\r\n开始换行了',
});

The effect is good, but the actual test on the real machine will cause line breaks.

Guess you like

Origin blog.csdn.net/qq_40047019/article/details/132206741