Selaa lähdekoodia

feature_20250926_数字题型&单行文本题型

zhujindu 1 kuukausi sitten
vanhempi
commit
93bbe573d3
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      src/views/deviceWithin/addStoreVisit.vue

+ 5 - 2
src/views/deviceWithin/addStoreVisit.vue

@@ -6263,14 +6263,17 @@ export default {
     telConfirm(val) {
       let item = '';
       let answerValue = '';
-      if (val.collectionOptionList && val.collectionOptionList.length) {
+      if (
+        val.collectionOptionList &&
+        val.collectionOptionList.length &&
+        val.collectionOptionList[0].answerValue
+      ) {
         answerValue = val.collectionOptionList[0].answerValue;
         item = val.collectionOptionList[0];
       } else {
         answerValue = val.answerValue;
         item = val;
       }
-
       if (!/^1[123456789]\d{9}$/.test(answerValue) || answerValue == '') {
         this.$toast(val.collectionName + '格式错误');
         return;