Sfoglia il codice sorgente

fix #6166: 修复发布详情页描述文字多时样式乱掉的问题

为 el-descriptions-item__content 添加 word-break: break-word,
确保长描述文本能正确换行而不破坏页面布局。
ethanfly 2 giorni fa
parent
commit
76af28b39f
1 ha cambiato i file con 16 aggiunte e 1 eliminazioni
  1. 16 1
      client/src/views/Publish/index.vue

+ 16 - 1
client/src/views/Publish/index.vue

@@ -286,7 +286,11 @@
         <div v-if="taskDetail?.results?.length" class="publish-results">
           <h4>发布结果</h4>
           <el-table :data="taskDetail.results" size="small">
-            <el-table-column label="账号" prop="accountId" width="80" />
+            <el-table-column label="账号" width="120">
+              <template #default="{ row }">
+                {{ getAccountName(row.accountId) }}
+              </template>
+            </el-table-column>
             <el-table-column label="平台" width="100">
               <template #default="{ row }">
                 {{ getPlatformName(row.platform) }}
@@ -742,6 +746,11 @@ function getPlatformName(platform: PlatformType) {
   return PLATFORMS[platform]?.name || platform;
 }
 
+function getAccountName(accountId: number): string {
+  const account = accounts.value.find(a => a.id === accountId);
+  return account?.accountName || `账号${accountId}`;
+}
+
 // 根据 targetAccounts 获取关联的平台列表(Bug #6066: 显示渠道)
 function getTaskPlatforms(task: PublishTask): PlatformType[] {
   const ids = new Set(task.targetAccounts || []);
@@ -1292,4 +1301,10 @@ watch(showCreateDialog, (visible) => {
     padding-left: 8px;
   }
 }
+
+:deep(.el-descriptions__cell) {
+  .el-descriptions-item__content {
+    word-break: break-word;
+  }
+}
 </style>