Skip to content

Commit 26bb36c

Browse files
committed
chore(ChatMessage): setting max-width
1 parent 0376d98 commit 26bb36c

File tree

6 files changed

+34
-28
lines changed

6 files changed

+34
-28
lines changed

packages/pro-components/chat/attachments/attachments.less

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,10 @@
185185

186186
// 对话中附件样式覆盖
187187
.@{attachments}--chatting {
188-
.@{attachments}__file {
189-
margin-top: 0;
190-
margin-bottom: @attachments-file-margin;
191-
}
192188

193189
&.all_images {
194190
width: 100%;
191+
195192
.file-image.@{attachments}__file {
196193
background-color: transparent !important;
197194
}
@@ -209,6 +206,11 @@
209206

210207
&.all_files {
211208
width: auto;
209+
210+
.@{attachments}__files:not(:last-child) {
211+
margin-bottom: @attachments-file-margin;
212+
}
213+
212214
.file-image.@{attachments}__file {
213215
background-color: transparent !important;
214216
}

packages/pro-components/chat/chat-list/_example/image/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Component({
177177
data: [
178178
{
179179
name: 'sample1.png',
180-
url: 'https://tdesign.gtimg.com/site/avatar.jpg',
180+
url: 'https://tdesign.gtimg.com/site/square.png',
181181
fileType: 'image',
182182
status: 'success',
183183
size: 1032,
@@ -186,7 +186,7 @@ Component({
186186
},
187187
{
188188
name: 'sample2.png',
189-
url: 'https://tdesign.gtimg.com/site/avatar.jpg',
189+
url: 'https://tdesign.gtimg.com/site/square.png',
190190
fileType: 'image',
191191
status: 'success',
192192
size: 1032,
@@ -195,7 +195,7 @@ Component({
195195
},
196196
{
197197
name: 'sample3.png',
198-
url: 'https://tdesign.gtimg.com/site/avatar.jpg',
198+
url: 'https://tdesign.gtimg.com/site/square.png',
199199
fileType: 'image',
200200
status: 'success',
201201
size: 1032,
@@ -204,7 +204,7 @@ Component({
204204
},
205205
{
206206
name: 'sample4.png',
207-
url: 'https://tdesign.gtimg.com/site/avatar.jpg',
207+
url: 'https://tdesign.gtimg.com/site/square.png',
208208
fileType: 'image',
209209
status: 'success',
210210
size: 1032,
@@ -213,7 +213,7 @@ Component({
213213
},
214214
{
215215
name: 'sample5.png',
216-
url: 'https://tdesign.gtimg.com/site/avatar.jpg',
216+
url: 'https://tdesign.gtimg.com/site/square.png',
217217
fileType: 'image',
218218
status: 'success',
219219
size: 1032,

packages/pro-components/chat/chat-loading/chat-loading.less

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@
4949
}
5050

5151
&--top {
52-
top: -8rpx;
52+
top: -6rpx;
5353
left: 7rpx;
5454
animation: dot-moving-top @chat-loading-animation-duration ease-in-out alternate infinite;
5555
}
5656

5757
&--left {
58-
bottom: -8rpx;
58+
bottom: -6rpx;
5959
left: -6rpx;
6060
animation: dot-moving-left @chat-loading-animation-duration ease-in-out alternate infinite;
6161
}
6262

6363
&--right {
64-
bottom: -8rpx;
64+
bottom: -6rpx;
6565
right: -6rpx;
6666
animation: dot-moving-right @chat-loading-animation-duration ease-in-out alternate infinite;
6767
}
@@ -94,37 +94,37 @@
9494
@keyframes dot-moving-top {
9595
0% {
9696
transform: scale(1);
97-
top: -7rpx;
97+
top: -6rpx;
9898
}
9999
to {
100-
transform: scale(1.75);
101-
top: 6rpx;
100+
transform: scale(2);
101+
top: 7rpx;
102102
}
103103
}
104104

105105
@keyframes dot-moving-left {
106106
0% {
107107
transform: scale(1);
108-
bottom: -7rpx;
109-
left: -7rpx;
108+
bottom: -6rpx;
109+
left: -6rpx;
110110
}
111111
to {
112-
transform: scale(1.75);
113-
bottom: 6rpx;
114-
left: 6rpx;
112+
transform: scale(2);
113+
bottom: 7rpx;
114+
left: 7rpx;
115115
}
116116
}
117117

118118
@keyframes dot-moving-right {
119119
0% {
120120
transform: scale(1);
121-
bottom: -7rpx;
122-
right: -7rpx;
121+
bottom: -6rpx;
122+
right: -6rpx;
123123
}
124124
to {
125-
transform: scale(1.75);
126-
bottom: 6rpx;
127-
right: 6rpx;
125+
transform: scale(2);
126+
bottom: 7rpx;
127+
right: 7rpx;
128128
}
129129
}
130130

packages/pro-components/chat/chat-message/_example/configure/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Component({
22
data: {
33
message: {
4-
role: 'user',
4+
role: 'system',
55
content: [
66
{
77
type: 'text',

packages/pro-components/chat/chat-message/chat-message.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
.@{chat-message}__base {
6363
padding-right: @spacer-2;
6464
}
65+
66+
.@{chat-content} {
67+
max-width: 90%;
68+
}
6569
}
6670

6771
// 助手消息样式

packages/pro-components/chat/chat-sender/_example/attachments/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Page({
99
{
1010
fileType: 'image',
1111
name: '图片1.png',
12-
url: 'https://tdesign.gtimg.com/site/avatar.jpg',
12+
url: 'https://tdesign.gtimg.com/site/square.png',
1313
},
1414
{
1515
fileType: 'pdf',
@@ -32,7 +32,7 @@ Page({
3232
{
3333
fileType: 'image',
3434
name: '图片1.png',
35-
url: 'https://tdesign.gtimg.com/site/avatar.jpg',
35+
url: 'https://tdesign.gtimg.com/site/square.png',
3636
},
3737
{
3838
fileType: 'pdf',

0 commit comments

Comments
 (0)