Skip to content

文本换行错误

原生的微信小程序,其 <text> 标签有较大的问题。

具体现象

不同的代码换行效果,导致小程序的文本出现了不同的换行情况。代码格式化功能反而影响了页面的文本布局。

无误代码

html
<view>
	报名
	<text class="registration-num">{{item.alumnInfoList.length}}</text>
</view>

效果如下:

2023-06-08-14-00-32

有误代码

html
<view>
	报名
	<text class="registration-num"> 
		{{item.alumnInfoList.length}}
	</text>
</view>

效果如下:

2023-06-08-14-10-22

贡献者

The avatar of contributor named as ruan-cat ruan-cat
The avatar of contributor named as 阮喵喵 阮喵喵

页面历史