Parcourir la source

修复打点信息弹窗显示问题

Hwf il y a 1 mois
Parent
commit
5aad1bcc87
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      src/components/Map/YztMap/index.vue
  2. 1 1
      src/components/Map/index.vue

+ 1 - 1
src/components/Map/YztMap/index.vue

@@ -274,7 +274,7 @@ const filterTd = (obj, dataType) => {
       if (i === 2) {
         i = 0;
       }
-      const value = !!obj[key] ? obj[key] : '';
+      const value = !!obj && !!obj[key] ? obj[key] : '';
       if (value && value.length > 8) {
         if (i === 0) {
           data.push({ type: 'longText', data: [{ label: keyLabel, value: value }] });

+ 1 - 1
src/components/Map/index.vue

@@ -238,7 +238,7 @@ const filterTd = (obj, dataType) => {
       if (i === 2) {
         i = 0;
       }
-      const value = !!obj[key] ? obj[key] : '';
+      const value = !!obj && !!obj[key] ? obj[key] : '';
       if (value && value.length > 8) {
         if (i === 0) {
           data.push({ type: 'longText', data: [{ label: keyLabel, value: value }] });