The official document: developers.weixin.qq.com/miniprogram…
Requirement: WHAT I’m doing here is rounding the values in the for loop
Introduced in WXML
<wxs module="filters" src="./filters.wxs"></wxs>
/ / use
<view wx:if="{{message.type === 'audio'}}" class='audio-wrapper-Ltext '>
{{filters.toFix(message.audio.dur / 1000)}}''
</view>
Copy the code