ソースを参照

优化了 问答广场中 卡片 name超长的问题

Ryuiso 3 ヶ月 前
コミット
e3f0be5013
1 ファイル変更14 行追加6 行削除
  1. 14 6
      src/pages/deepseek/questionAnswer/list/index.tsx

+ 14 - 6
src/pages/deepseek/questionAnswer/list/index.tsx

@@ -643,12 +643,20 @@ const QuestionAnswerList: React.FC = () => {
                             justifyContent: 'center',
                             height: '100%'
                           }}>
-                            <div style={{
-                              lineHeight: '18px',
-                              fontSize: 14,
-                              fontWeight: 500,
-                              overflow: 'auto'
-                            }}>{item.name}</div>
+                            <Tooltip title={item.name} placement="right">
+                              <div style={{
+                                lineHeight: '18px',
+                                fontSize: 14,
+                                fontWeight: 500,
+                                overflow: 'hidden',
+                                textOverflow: 'ellipsis',
+                                whiteSpace: 'nowrap',
+                                // maxWidth: '200px', // 可以根据需要调整宽度
+                                cursor: 'pointer'
+                              }}>
+                                {item.name.length > 20 ? `${item.name.substring(0, 30)}...` : item.name}
+                              </div>
+                            </Tooltip>
                             <Space size={4} style={{ lineHeight: '18px' }}>
                               <span style={{
                                 color: '#999',