微信小程序富文本解析wxParse
问题描述:
str = str.replace(/ /g, '\xa0'); 我修改了这行代码 还是解析不了空格
答
有帮助麻烦点个采纳【本回答右上角】,谢谢~~有其他问题可以继续交流~
增加space="nbsp"就行,空白不用替换
有帮助麻烦点个采纳【本回答右上角】,谢谢~~有其他问题可以继续交流~
Page({
onLoad(){
var html='a b';
this.setData({html});
}
})
<rich-text space="nbsp" nodes="{{html}}"></rich-text>