diff --git a/chat-client/src/views/chatweb/components/MessageItem.vue b/chat-client/src/views/chatweb/components/MessageItem.vue index e1a9176..a4888f5 100644 --- a/chat-client/src/views/chatweb/components/MessageItem.vue +++ b/chat-client/src/views/chatweb/components/MessageItem.vue @@ -944,9 +944,10 @@ const hasAnySources = (sources: TraceData | null | undefined) => { overflow: auto; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); background: white; - font-size: 0.83rem; /* 比正文(0.95rem)小2px,约为0.83rem */ - line-height: 1.4; + font-size: 0.75rem; /* 12px */ + line-height: 1.3; border: 1px solid #e5e7eb; + table-layout: auto; /* 允许列宽根据内容自适应 */ } ::v-deep .table-wrapper summary { @@ -971,15 +972,15 @@ const hasAnySources = (sources: TraceData | null | undefined) => { .answer-content :deep(th), .answer-content :deep(td) { - padding: 0.75rem 1rem; + padding: 0.5rem 0.75rem; /* 减少内边距,使表格更紧凑 */ border: 1px solid #e5e7eb; text-align: left; vertical-align: top; word-wrap: break-word; - max-width: 200px; + max-width: none; /* 移除最大宽度限制,允许列宽自适应 */ word-break: break-word; white-space: normal; - font-size: 0.83rem; /* 确保表格单元格字体也比正文小2px */ + font-size: 0.75rem; /* 12px */ } .answer-content :deep(th) { @@ -987,7 +988,7 @@ const hasAnySources = (sources: TraceData | null | undefined) => { background: #f8fafc; font-weight: 600; color: #374151; - font-size: 0.83rem; /* 与表格整体字体大小保持一致,比正文小2px */ + font-size: 0.8125rem; /* 13px */ text-transform: uppercase; letter-spacing: 0.025em; position: sticky; @@ -1043,21 +1044,22 @@ const hasAnySources = (sources: TraceData | null | undefined) => { @media (max-width: 768px) { .answer-content :deep(table) { min-width: 600px; - font-size: 0.75rem; /* 移动端保持比正文小的比例 */ + font-size: 0.6875rem; /* 11px 移动端 */ margin: 1rem 0; border: 1px solid #e5e7eb; + line-height: 1.2; /* 移动端更紧凑的行高 */ } .answer-content :deep(th), .answer-content :deep(td) { - padding: 0.5rem 0.75rem; - max-width: 150px; + padding: 0.375rem 0.5rem; /* 移动端更紧凑的内边距 */ + max-width: none; /* 移动端也允许列宽自适应 */ border: 1px solid #e5e7eb; - font-size: 0.75rem; /* 移动端表格单元格字体 */ + font-size: 0.6875rem; /* 11px 移动端表格内容 */ } .answer-content :deep(th) { - font-size: 0.75rem; /* 移动端表头字体 */ + font-size: 0.75rem; /* 12px 移动端表头 */ border-bottom: 2px solid #e5e7eb; } } diff --git a/chat-client/src/views/chatweb/composables/useMessageHandlers.ts b/chat-client/src/views/chatweb/composables/useMessageHandlers.ts index 0dcdaa7..364db84 100644 --- a/chat-client/src/views/chatweb/composables/useMessageHandlers.ts +++ b/chat-client/src/views/chatweb/composables/useMessageHandlers.ts @@ -77,7 +77,7 @@ export function useMessageHandlers() { //g, `
- Expand / Collapse table + 展开 / 折叠表格
` ).replace( diff --git a/chat-client/src/views/chatweb/intelRetrieval/index.vue b/chat-client/src/views/chatweb/intelRetrieval/index.vue index 0383f81..8f29d8e 100644 --- a/chat-client/src/views/chatweb/intelRetrieval/index.vue +++ b/chat-client/src/views/chatweb/intelRetrieval/index.vue @@ -1,14 +1,27 @@