index.less
3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/* index.less */
.container {
height: 90vh;
display: flex;
flex-direction: column;
background-color: #fff;
overflow: hidden;
position: relative;
// top: 70px;
width: 100%;
// margin-top: 75px;
}
:global {
.container {
.am-tabs-tab-bar-wrap {
display: none;;
}
.am-tab-bar-item {
overflow: hidden;
}
.am-navbar-title {
visibility: hidden;
}
}
}
.header {
background-color: #2c3e50;
color: white;
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.headerTitle {
font-size: 16px;
font-weight: bold;
}
.headerSubtitle {
font-size: 12px;
opacity: 0.8;
margin-top: 2px;
}
.headerButton {
color: white !important;
}
.messageContainer {
overflow-y: auto;
padding: 16px;
background-color: white;
height: calc(90vh - 180px);
flex: 1;
overflow-y: auto;
padding: 16px;
background-color: white;
// 👇 关键:防止内容过少时容器高度塌陷
// min-height: 0; /* 这是 flex 布局中子项能正确收缩的关键 */
margin-bottom: 60px;
}
.messageItem {
display: flex;
justify-content: flex-start;
margin-bottom: 12px;
&.userMessage {
justify-content: flex-end;
}
}
.messageBubble {
max-width: 85%;
padding: 12px 16px;
border-radius: 5px 20px 20px 20px;
background-color: #f8f9fa;
color: #333;
border: 1px solid #e9ecef;
&.userBubble {
border-radius: 20px 5px 20px 20px;
background: linear-gradient(90deg, #667eea, #764ba2);
color: white;
border: none;
}
&.aiBubble {
border-radius: 5px 20px 20px 20px;
background-color: #f8f9fa;
color: #333;
border: 1px solid #e9ecef;
}
}
.messageContent {
font-size: 14px;
line-height: 1.5;
}
.messageMeta {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 6px;
font-size: 11px;
color: #6c757d;
}
.actionButton {
// 样式已由antd-mobile组件自身处理
}
.inputContainer {
padding: 12px 16px;
background-color: white;
border-top: 1px solid #e9ecef;
position: fixed;
bottom: 0;
height: 80px;
width: 100%;
z-index: 999;
}
.inputWrapper {
display: flex;
gap: 8px;
align-items: flex-end;
}
.inputField {
flex: 1;
padding: 12px 16px !important;
border-radius: 20px !important;
border: 1px solid #e9ecef !important;
font-size: 14px !important;
}
.sendButton {
border-radius: 20px !important;
padding: 12px 16px !important;
}
.sidebarContainer {
width: 280px;
height: 100vh;
background-color: #f8f9fa;
}
.sidebarHeader {
padding: 16px;
background-color: white;
border-bottom: 1px solid #e9ecef;
}
.sidebarTitle {
margin: 0;
font-size: 16px;
}
.presetItem {
background-color: white !important;
margin: 8px 16px !important;
border-radius: 8px !important;
}
.clearItem {
background-color: white !important;
margin: 8px 16px !important;
border-radius: 8px !important;
}
.cursor {
display: inline-block;
width: 4px;
height: 16px;
background-color: #333;
margin-left: 4px;
animation: blink 1s infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}