فهرست منبع

fix: 修复空值

zhangyuhan 1 سال پیش
والد
کامیت
0c7e35f20d
1فایلهای تغییر یافته به همراه21 افزوده شده و 19 حذف شده
  1. 21 19
      apps/bigmember_pc/src/views/article-content/pages/Article.vue

+ 21 - 19
apps/bigmember_pc/src/views/article-content/pages/Article.vue

@@ -135,25 +135,27 @@ function doSelectTab(item) {
 
 // 招标、采购进度
 const timeLineList = computed(() => {
-  return ContentExpandsModel.value.projectProgress.list?.map((v) => {
-    return {
-      content: replaceKeyword(
-        v.title,
-        ContentExpandsModel.value.projectProgress.name,
-        ['<span class="highlight-text">', '</span>']
-      ),
-      contentType: [
-        v._data?.toptype ? '招标' + v._data?.toptype : '',
-        v._data?.subtype
-      ].filter((v) => v),
-      money: v?.bidAmount ? moneyUnit(v?.bidAmount) + '元' : '',
-      id: v.id,
-      s_id: v.id,
-      tags: [v.tag],
-      time: v.time,
-      isActive: v.isActive
-    }
-  })
+  return (
+    ContentExpandsModel.value.projectProgress.list?.map((v) => {
+      return {
+        content: replaceKeyword(
+          v.title,
+          ContentExpandsModel.value.projectProgress.name,
+          ['<span class="highlight-text">', '</span>']
+        ),
+        contentType: [
+          v._data?.toptype ? '招标' + v._data?.toptype : '',
+          v._data?.subtype
+        ].filter((v) => v),
+        money: v?.bidAmount ? moneyUnit(v?.bidAmount) + '元' : '',
+        id: v.id,
+        s_id: v.id,
+        tags: [v.tag],
+        time: v.time,
+        isActive: v.isActive
+      }
+    }) || []
+  )
 })
 
 const isFixedHeader = ref(false)