Przeglądaj źródła

调整设施环境自定义组件默认范围值

luoaoxuan 1 rok temu
rodzic
commit
e39e9ef718
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      src/views/component/facility/facilityData.vue

+ 2 - 3
src/views/component/facility/facilityData.vue

@@ -268,9 +268,8 @@ export default {
         // 计算状态
         getStatus (range, result) {
             let [min, max] = range
-            if (min === null || min === '' || typeof min === 'undefined') min = Number.MIN_VALUE
-            if (max === null || max === '' || typeof max === 'undefined') max = Number.MAX_VALUE
-            // console.log(min, max, result)
+            if (min === null || min === '' || typeof min === 'undefined') min = Number.NEGATIVE_INFINITY
+            if (max === null || max === '' || typeof max === 'undefined') max = Number.POSITIVE_INFINITY
             if (+min === 0 && +max === 0) {
                 return '正常'
             }