File tree Expand file tree Collapse file tree 6 files changed +34
-28
lines changed
packages/pro-components/chat
chat-sender/_example/attachments Expand file tree Collapse file tree 6 files changed +34
-28
lines changed Original file line number Diff line number Diff line change 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 }
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 }
Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff line change 4949 }
5050
5151 &--top {
52- top : -8 rpx ;
52+ top : -6 rpx ;
5353 left : 7 rpx;
5454 animation : dot- moving- top @chat-loading-animation-duration ease-in-out alternate infinite ;
5555 }
5656
5757 &--left {
58- bottom : -8 rpx ;
58+ bottom : -6 rpx ;
5959 left : -6 rpx;
6060 animation : dot- moving- left @chat-loading-animation-duration ease-in-out alternate infinite ;
6161 }
6262
6363 &--right {
64- bottom : -8 rpx ;
64+ bottom : -6 rpx ;
6565 right : -6 rpx;
6666 animation : dot- moving- right @chat-loading-animation-duration ease-in-out alternate infinite ;
6767 }
9494@keyframes dot- moving- top {
9595 0% {
9696 transform : scale (1 );
97- top : -7 rpx ;
97+ top : -6 rpx ;
9898 }
9999 to {
100- transform : scale (1.75 );
101- top : 6 rpx ;
100+ transform : scale (2 );
101+ top : 7 rpx ;
102102 }
103103}
104104
105105@keyframes dot- moving- left {
106106 0% {
107107 transform : scale (1 );
108- bottom : -7 rpx ;
109- left : -7 rpx ;
108+ bottom : -6 rpx ;
109+ left : -6 rpx ;
110110 }
111111 to {
112- transform : scale (1.75 );
113- bottom : 6 rpx ;
114- left : 6 rpx ;
112+ transform : scale (2 );
113+ bottom : 7 rpx ;
114+ left : 7 rpx ;
115115 }
116116}
117117
118118@keyframes dot- moving- right {
119119 0% {
120120 transform : scale (1 );
121- bottom : -7 rpx ;
122- right : -7 rpx ;
121+ bottom : -6 rpx ;
122+ right : -6 rpx ;
123123 }
124124 to {
125- transform : scale (1.75 );
126- bottom : 6 rpx ;
127- right : 6 rpx ;
125+ transform : scale (2 );
126+ bottom : 7 rpx ;
127+ right : 7 rpx ;
128128 }
129129}
130130
Original file line number Diff line number Diff line change 11Component ( {
22 data : {
33 message : {
4- role : 'user ' ,
4+ role : 'system ' ,
55 content : [
66 {
77 type : 'text' ,
Original file line number Diff line number Diff line change 6262 .@{chat-message} __base {
6363 padding-right : @spacer-2 ;
6464 }
65+
66+ .@{chat-content} {
67+ max-width : 90% ;
68+ }
6569 }
6670
6771 // 助手消息样式
Original file line number Diff line number Diff line change 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' ,
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' ,
You can’t perform that action at this time.
0 commit comments