File tree Expand file tree Collapse file tree 8 files changed +43
-43
lines changed
packages/pro-components/chat
attachments/_example/file
chat-message/_example/content Expand file tree Collapse file tree 8 files changed +43
-43
lines changed Original file line number Diff line number Diff line change 99 status : 'success' ,
1010 } ,
1111 {
12- fileType : 'xls ' ,
12+ fileType : 'excel ' ,
1313 name : 'excel-file.xlsx' ,
1414 url : 'https://example.com/excel-file.xlsx' ,
1515 size : 222859 ,
3737 status : 'success' ,
3838 } ,
3939 {
40- fileType : 'audio ' ,
41- name : 'audio- file.mp3 ' ,
40+ fileType : 'file ' ,
41+ name : 'file' ,
4242 url : 'https://example.com/audio-file.mp3' ,
4343 size : 222859 ,
4444 status : 'success' ,
Original file line number Diff line number Diff line change 7070 // 操作项
7171 &__item {
7272 color : @chat-actionbar-item-color ;
73- margin : 8 rpx 0 ;
74- padding : 8 rpx 28 rpx;
73+ margin : 12 rpx 0 ;
74+ padding : 4 rpx 28 rpx;
7575 border-right : 2 rpx solid @component-stroke ;
7676 background-color : unset ;
7777 outline : none ;
Original file line number Diff line number Diff line change 22 background-color: var(--td-bg-color-container);
33 padding: 32rpx;
44 display: flex;
5+ align-items: center;
56 gap: 48rpx;
67}
Original file line number Diff line number Diff line change 1414 }
1515
1616 &__icon {
17- width : 28 rpx;
18- height : 28 rpx;
19- padding : 6 rpx;
20- margin-right : 8 rpx;
21-
2217 .@{chat-loading} __skeleton {
2318 width : 100%
2419 }
4136 margin : 0 6 rpx 0 0 ;
4237 scale : 0.8 ;
4338
44- view {
39+ &--top ,
40+ &--left ,
41+ &--right {
4542 position : absolute ;
4643 width : 16 rpx;
4744 height : 16 rpx;
Original file line number Diff line number Diff line change 33<view class="class {{[classPrefix]}}" style="{{_._style([style, customStyle])}}">
44 <!-- 动态加载动画 -->
55 <view wx:if="{{animation !== 'skeleton'}}" class="{{classPrefix}}__icon">
6- <block wx:if="{{animation==='moving'}}">
6+ <block wx:if="{{animation === 'moving'}}">
77 <view class="{{classPrefix}}__moving">
88 <view class="{{classPrefix}}__moving--top" />
99 <view class="{{classPrefix}}__moving--left" />
2525 </view>
2626 </block>
2727 <!-- 文本内容 -->
28- <view class="{{classPrefix}}__text">{{text}}</view>
28+ <view wx:if="{{text}}" class="{{classPrefix}}__text">{{text}}</view>
2929</view>
Original file line number Diff line number Diff line change @@ -106,34 +106,34 @@ Component({
106106 width : 1920 , // 图片实际宽度
107107 height : 1080 , // 图片实际高度
108108 } ,
109- // {
110- // fileType: 'pdf',
111- // name: 'document.pdf',
112- // url: 'https://example.com/document.pdf',
113- // size: 3072,
114- // status: 'success',
115- // },
116- // {
117- // fileType: 'doc',
118- // name: 'report.docx',
119- // url: 'https://example.com/report.docx',
120- // size: 1536,
121- // status: 'success',
122- // },
123- // {
124- // fileType: 'audio',
125- // name: 'audio.mp3',
126- // url: 'https://example.com/audio.mp3',
127- // size: 512,
128- // status: 'success',
129- // },
130- // {
131- // fileType: 'ppt',
132- // name: 'presentation.ppt',
133- // url: 'https://example.com/presentation.ppt',
134- // size: 512,
135- // status: 'success',
136- // },
109+ {
110+ fileType : 'pdf' ,
111+ name : 'document.pdf' ,
112+ url : 'https://example.com/document.pdf' ,
113+ size : 3072 ,
114+ status : 'success' ,
115+ } ,
116+ {
117+ fileType : 'doc' ,
118+ name : 'report.docx' ,
119+ url : 'https://example.com/report.docx' ,
120+ size : 1536 ,
121+ status : 'success' ,
122+ } ,
123+ {
124+ fileType : 'audio' ,
125+ name : 'audio.mp3' ,
126+ url : 'https://example.com/audio.mp3' ,
127+ size : 512 ,
128+ status : 'success' ,
129+ } ,
130+ {
131+ fileType : 'ppt' ,
132+ name : 'presentation.ppt' ,
133+ url : 'https://example.com/presentation.ppt' ,
134+ size : 512 ,
135+ status : 'success' ,
136+ } ,
137137 {
138138 fileType : 'xls' ,
139139 name : 'spreadsheet.xls' ,
Original file line number Diff line number Diff line change 11<view class="chat-example">
22 <!-- 附件消息 -->
3- <!-- < view class="chat-example-block">
3+ <view class="chat-example-block">
44 <t-chat-message
55 content="{{pic1.content}}"
66 role="{{pic1.role}}"
2828 role="{{fileMessage.role}}"
2929 chatContentProps="{{chatContentProps}}"
3030 ></t-chat-message>
31- </view> -->
31+ </view>
3232 <view class="chat-example-block">
3333 <t-chat-message
3434 content="{{fileMessage.content}}"
Original file line number Diff line number Diff line change 1919 }
2020
2121 &__hd {
22+ height : 48 rpx;
23+ overflow : hidden ;
2224 display : flex ;
2325 align-items : center ;
2426
You can’t perform that action at this time.
0 commit comments