Преглед изворни кода

history.type null-ref bug fixed

hare8999@163.com пре 2 година
родитељ
комит
774ec53b8f
1 измењених фајлова са 5 додато и 3 уклоњено
  1. 5 3
      src/views/career/zhiyuan/components/zhiyuan-list.vue

+ 5 - 3
src/views/career/zhiyuan/components/zhiyuan-list.vue

@@ -16,7 +16,9 @@
     <template #t1="{row}">
       <!-- 院校 -->
       <div>
-        <p class="mb10"><span class="pointer">{{ `${row.university.name}(${row.recruitPlan.collegeCode})` || '' }}</span></p>
+        <p class="mb10"><span class="pointer">{{
+            `${row.university.name}(${row.recruitPlan.collegeCode})` || ''
+          }}</span></p>
         <p class="mb5 f-9b f12">{{ row.university.features.split(',').join(' ') }}</p>
         <p class="mb5 f-9b f12">{{ row.university.location }} {{ row.university.cityName }}
           排名{{ row.university.ranking }}</p>
@@ -34,7 +36,7 @@
       <!--   历年 -->
       <div class="f14">
         <p>{{ row.history ? row.history.year || '-' : '-' }}</p>
-        <p>{{row.history.type || ''}}</p>
+        <p>{{ row.history && row.history.type }}</p>
       </div>
     </template>
     <template #t4="{row}">
@@ -155,7 +157,7 @@ export default {
         columns.push({
           label: item,
           slotBody: 't' + index,
-          width: index >= 3 || index ==  0 ?  '100px' : ''
+          width: index >= 3 || index == 0 ? '100px' : ''
         })
       })
       columns.push({