Sfoglia il codice sorgente

温度拨盘默认值

zhouna 5 anni fa
parent
commit
194ab06471
2 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 1 1
      src/common/Picker.vue
  2. 3 2
      src/components/MainPage.vue

+ 1 - 1
src/common/Picker.vue

@@ -28,7 +28,7 @@ export default {
       defaultVal:{default:""},
       columns:{
         default:function() {
-          return ['37.3°C', '37.4°C', '37.5°C', '37.6°C', '37.7°C', '37.8°C', '37.9°C', '38.0°C',
+          return ['37.0°C', '37.1°C', '37.2°C','37.3°C', '37.4°C', '37.5°C', '37.6°C', '37.7°C', '37.8°C', '37.9°C', '38.0°C',
             '38.1°C', '38.2°C', '38.3°C', '38.4°C', '38.5°C', '38.6C', '38.7°C', '38.8°C', '38.9°C',
             '39.0°C', '39.1°C', '39.2°C', '39.3°C', '39.4°C', '39.5°C', '39.6°C', '39.7°C', '39.8°C',
             '39.9°C', '40.0°C', '40.1°C', '40.2°C', '40.3°C', '40.4°C', '40.5°C', '40.6°C', '40.7°C',

+ 3 - 2
src/components/MainPage.vue

@@ -204,8 +204,9 @@ export default {
     }
   },
   methods:{
-    getColumns(){
-      return getValuesArr(this.symptomResult.questionDetailList);
+    getColumns(){   //后台数据为空,则使用默认值
+      const arr=getValuesArr(this.symptomResult.questionDetailList);
+      return arr.length>0?arr:undefined;
     },
     previewRes(){
       this.$router.push({