Browse Source

fix:修改消息发布提示信息

贾宇博 2 months ago
parent
commit
aa9519cabe
1 changed files with 12 additions and 5 deletions
  1. 12 5
      src/views/equity/NewsRelease/index.vue

+ 12 - 5
src/views/equity/NewsRelease/index.vue

@@ -54,12 +54,18 @@
       <el-table-column label="通知人" align="center" prop="recipients" width="360">
         <template #default="{ row }">
           <div class="tag-container">
-            <el-tooltip v-for="(recipient, index) in row.recipients" :key="index"
-              :content="recipient.voteReason || '暂无无备注信息'" placement="top">
-              <el-tag :type="getTagTypeMap[String(recipient.status)]">
+            <template v-for="(recipient, index) in row.recipients" :key="index">
+              <!-- 仅当 voteReason 有值时显示 tooltip -->
+              <el-tooltip v-if="recipient.voteReason" :content="recipient.voteReason" placement="top" :hide-after="0">
+                <el-tag :type="getTagTypeMap[String(recipient.status)]">
+                  {{ recipient.userName }}
+                </el-tag>
+              </el-tooltip>
+              <!-- 否则直接显示 el-tag(无 tooltip) -->
+              <el-tag v-else :type="getTagTypeMap[String(recipient.status)]">
                 {{ recipient.userName }}
               </el-tag>
-            </el-tooltip>
+            </template>
           </div>
         </template>
       </el-table-column>
@@ -450,6 +456,7 @@ getCompany()
 .tag-container {
   display: flex;
   flex-wrap: wrap;
-  gap: 6px; /* 调整标签间距 */
+  gap: 6px;
+  /* 调整标签间距 */
 }
 </style>