|
2 | 2 | overflow: hidden; |
3 | 3 | } |
4 | 4 |
|
| 5 | +/* Ant Design Tree 样式覆盖 */ |
| 6 | +.chat-history-tree .ant-tree-treenode { |
| 7 | + width: 100%; |
| 8 | +} |
| 9 | + |
| 10 | +.chat-history-tree .ant-tree-node-content-wrapper { |
| 11 | + flex: 1; |
| 12 | + min-width: 0; |
| 13 | + overflow: hidden; |
| 14 | +} |
| 15 | + |
| 16 | +.chat-history-tree .ant-tree-title { |
| 17 | + width: 100%; |
| 18 | + overflow: hidden; |
| 19 | +} |
| 20 | + |
5 | 21 | .tree-node { |
6 | 22 | position: relative; |
7 | 23 | display: flex; |
8 | 24 | align-items: center; |
9 | | - justify-content: space-between; |
10 | 25 | padding: 4px 8px; |
11 | 26 | border-radius: 4px; |
12 | 27 | transition: all 0.2s; |
13 | 28 | cursor: pointer; |
14 | | -} |
15 | | - |
16 | | -.tree-node:hover { |
17 | | - background-color: #f5f5f5; |
| 29 | + width: 100%; |
| 30 | + box-sizing: border-box; |
18 | 31 | } |
19 | 32 |
|
20 | 33 | .tree-node-content { |
|
23 | 36 | flex: 1; |
24 | 37 | min-width: 0; |
25 | 38 | gap: 8px; |
26 | | -} |
27 | | - |
28 | | -.tree-node-icon { |
29 | | - flex-shrink: 0; |
30 | | - color: #666; |
| 39 | + overflow: hidden; |
31 | 40 | } |
32 | 41 |
|
33 | 42 | .tree-node-title { |
34 | 43 | flex: 1; |
35 | 44 | min-width: 0; |
36 | 45 | overflow: hidden; |
| 46 | + text-overflow: ellipsis; |
| 47 | + white-space: nowrap; |
37 | 48 | } |
38 | 49 |
|
39 | 50 | .tree-node-actions { |
|
42 | 53 | gap: 4px; |
43 | 54 | opacity: 0; |
44 | 55 | transition: opacity 0.2s; |
| 56 | + flex-shrink: 0; |
| 57 | + margin-left: 8px; |
45 | 58 | } |
46 | 59 |
|
47 | 60 | .tree-node:hover .tree-node-actions { |
48 | 61 | opacity: 1; |
49 | 62 | } |
50 | 63 |
|
51 | | -.tree-node-folder { |
52 | | - font-weight: 500; |
53 | | -} |
54 | | - |
55 | | -.tree-node-chat { |
56 | | - font-weight: normal; |
57 | | -} |
58 | | - |
59 | | -/* Antd Tree customizations */ |
60 | | -.ant-tree .ant-tree-node-content-wrapper { |
61 | | - padding: 0; |
62 | | -} |
63 | | - |
64 | | -.ant-tree .ant-tree-title { |
65 | | - width: 100%; |
66 | | -} |
67 | | - |
68 | | -.ant-tree .ant-tree-node-selected { |
69 | | - background-color: #e6f7ff !important; |
70 | | -} |
71 | | - |
72 | | -.ant-tree .ant-tree-node-selected .tree-node { |
73 | | - background-color: #e6f7ff; |
74 | | -} |
75 | | - |
76 | | - |
77 | | -@keyframes pulse { |
78 | | - 0% { |
79 | | - opacity: 1; |
80 | | - } |
81 | | - 50% { |
82 | | - opacity: 0.7; |
83 | | - } |
84 | | - 100% { |
85 | | - opacity: 1; |
86 | | - } |
87 | | -} |
88 | | - |
89 | | -/* 拖拽相关样式 */ |
90 | | -.ant-tree-drag-over { |
91 | | - background-color: #e6f7ff !important; |
92 | | -} |
93 | | - |
94 | | -.ant-tree-drag-over-gap-top { |
95 | | - border-top: 2px solid #1890ff !important; |
96 | | -} |
97 | | - |
98 | | -.ant-tree-drag-over-gap-bottom { |
99 | | - border-bottom: 2px solid #1890ff !important; |
100 | | -} |
101 | | - |
102 | | -.ant-tree-draggable-icon { |
103 | | - color: #1890ff; |
104 | | - cursor: grab; |
105 | | -} |
106 | | - |
107 | | -.ant-tree-draggable-icon:active { |
108 | | - cursor: grabbing; |
109 | | -} |
110 | | - |
111 | | -.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { |
112 | | - background-color: #e6f7ff; |
113 | | -} |
114 | | - |
115 | | -/* 拖拽时的ghost样式 */ |
116 | | -.ant-tree-drag-ghost { |
117 | | - opacity: 0.5; |
118 | | - background-color: #f0f0f0; |
119 | | - border: 1px dashed #d9d9d9; |
120 | | - border-radius: 4px; |
121 | | - padding: 4px 8px; |
122 | | -} |
123 | | - |
124 | | -/* 拖拽提示样式 */ |
125 | | -.ant-tree-drop-indicator { |
126 | | - height: 2px; |
127 | | - background-color: #1890ff; |
128 | | - position: absolute; |
129 | | - left: 0; |
130 | | - right: 0; |
131 | | - z-index: 1; |
| 64 | +.tree-node-icon { |
| 65 | + display: flex; |
| 66 | + align-items: center; |
| 67 | + flex-shrink: 0; |
132 | 68 | } |
0 commit comments