Skip to content

Commit 1d3a924

Browse files
committed
fix(ChatLoading): fix text spacing error
1 parent 1c3cfd6 commit 1d3a924

File tree

8 files changed

+43
-43
lines changed

8 files changed

+43
-43
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Page({
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,
@@ -37,8 +37,8 @@ Page({
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',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
// 操作项
7171
&__item {
7272
color: @chat-actionbar-item-color;
73-
margin: 8rpx 0;
74-
padding: 8rpx 28rpx;
73+
margin: 12rpx 0;
74+
padding: 4rpx 28rpx;
7575
border-right: 2rpx solid @component-stroke;
7676
background-color: unset;
7777
outline: none;

packages/pro-components/chat/chat-loading/_example/base/index.wxss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
background-color: var(--td-bg-color-container);
33
padding: 32rpx;
44
display: flex;
5+
align-items: center;
56
gap: 48rpx;
67
}

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
}
1515

1616
&__icon {
17-
width: 28rpx;
18-
height: 28rpx;
19-
padding: 6rpx;
20-
margin-right: 8rpx;
21-
2217
.@{chat-loading}__skeleton{
2318
width: 100%
2419
}
@@ -41,7 +36,9 @@
4136
margin: 0 6rpx 0 0;
4237
scale: 0.8;
4338

44-
view {
39+
&--top,
40+
&--left,
41+
&--right {
4542
position: absolute;
4643
width: 16rpx;
4744
height: 16rpx;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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" />
@@ -25,5 +25,5 @@
2525
</view>
2626
</block>
2727
<!-- 文本内容 -->
28-
<view class="{{classPrefix}}__text">{{text}}</view>
28+
<view wx:if="{{text}}" class="{{classPrefix}}__text">{{text}}</view>
2929
</view>

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

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff 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',

packages/pro-components/chat/chat-message/_example/content/index.wxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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}}"
@@ -28,7 +28,7 @@
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}}"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
}
2020

2121
&__hd {
22+
height: 48rpx;
23+
overflow: hidden;
2224
display: flex;
2325
align-items: center;
2426

0 commit comments

Comments
 (0)