diff --git a/src/rate/rate.wxml b/src/rate/rate.wxml index 8211ab3b6..19b24ed0a 100644 --- a/src/rate/rate.wxml +++ b/src/rate/rate.wxml @@ -20,7 +20,7 @@ wx:for="{{ count }}" wx:key="*this" class="{{classPrefix }}__icon {{utils.getIconClass(classPrefix + '__icon', defaultValue, value, index, allowHalf, disabled, scaleIndex)}}" - style="margin-right:{{ count - index > 1 ? gap : 0 }}px; {{utils.getColor(color)}}" + style="margin-right: {{ count - index > 1 ? _.addUnit(gap) : 0 }}; {{utils.getColor(color)}}" t-class="{{prefix}}-class-icon" name="{{utils.getIconName(defaultValue, value, index, icon)}}" size="{{ size }}"