文章目录
微信小程序报错 ubepected character
问题

分析
- 源代码
wxml
<image
src="../../assets/images/组 1105@2x.png"
mode="aspectFit"
style="
width: 32rpx;
height: 32rpx;
border-radius: 24rpx;
margin-right: 20rpx;
"
/>
- 分析
这段代码的问题在于 style 属性中的换行和空格格式。在小程序中,style 属性需要在一行内写完 - 解决
javascript
<image
src="../../assets/images/组 1105@2x.png"
mode="aspectFit"
style="width: 32rpx;height: 32rpx;border-radius: 24rpx;margin-right: 20rpx;"
/>