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