Explorar o código

距离显示优化

shizhongqi hai 4 meses
pai
achega
dd41640e93
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      hdApp/src/admin/home/workbench.vue

+ 1 - 1
hdApp/src/admin/home/workbench.vue

@@ -86,7 +86,7 @@
                           </block>
     
                         </text>
-                        <text class="text_distance" v-if="ghsInfo.distance && ghsInfo.distance > 0">{{ Math.round(Number(ghsInfo.distance) / 1000) }}km</text>
+                        <text class="text_distance" v-if="ghsInfo.distance && ghsInfo.distance > 0">{{ ghsInfo.distance > 1000 ? Math.round(Number(ghsInfo.distance) / 1000) + 'km' : ghsInfo.distance + 'm' }}</text>
                       </view>
                     </view>
                     <view class="box_4 flex-col"></view>