Skip to content

Commit 49b18b3

Browse files
author
weilei
committed
fix(examples): 统一图标尺寸属性绑定方式,解决在firefox浏览器中图标显示异常的问题
1 parent 9e87e97 commit 49b18b3

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

examples/src/views/DifyChat/components/BubbleListFooter.vue

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
>
1212
<SvgIcon
1313
iconClass="action-btn"
14-
size="20"
14+
:size="20"
1515
name="copy"
1616
color="rgb(139 139 139)"
1717
@click.native="handleCopyMessage(item)"
@@ -25,7 +25,7 @@
2525
>
2626
<SvgIcon
2727
iconClass="action-btn"
28-
size="20"
28+
:size="20"
2929
name="edit"
3030
color="rgb(139 139 139)"
3131
@click.native="handleEditMessage(item)"
@@ -44,7 +44,7 @@
4444
>
4545
<SvgIcon
4646
iconClass="action-btn"
47-
size="20"
47+
:size="20"
4848
name="copy"
4949
color="rgb(139 139 139)"
5050
@click.native="handleCopyMessage(item)"
@@ -59,7 +59,7 @@
5959
>
6060
<SvgIcon
6161
iconClass="action-btn"
62-
size="20"
62+
:size="20"
6363
name="refresh"
6464
color="rgb(139 139 139)"
6565
@click.native="handleRetryMessage(item)"
@@ -73,7 +73,7 @@
7373
>
7474
<SvgIcon
7575
iconClass="action-btn"
76-
size="20"
76+
:size="20"
7777
name="like"
7878
:color="
7979
item.feedback != null && item.feedback.rating === 'like'
@@ -97,7 +97,7 @@
9797
>
9898
<SvgIcon
9999
iconClass="action-btn"
100-
size="20"
100+
:size="20"
101101
name="dislike"
102102
:color="
103103
item.feedback != null && item.feedback.rating === 'dislike'
@@ -123,9 +123,17 @@
123123
placeholder="请输入您的反馈意见..."
124124
v-model="feedbackContent"
125125
></el-input>
126-
<span slot="footer" class="dialog-footer">
126+
<span
127+
slot="footer"
128+
class="dialog-footer"
129+
>
127130
<el-button @click="handleFeedbackDialogCancel">取消</el-button>
128-
<el-button type="primary" @click="handleFeedbackDialogConfirm">确定</el-button>
131+
<el-button
132+
type="primary"
133+
@click="handleFeedbackDialogConfirm"
134+
>
135+
确定
136+
</el-button>
129137
</span>
130138
</el-dialog>
131139
</div>
@@ -264,11 +272,7 @@
264272
// 通过事件向父组件传递反馈更新
265273
this.$emit('update-feedback', {
266274
messageId: item.id,
267-
feedback: newRating
268-
? {
269-
rating: newRating,
270-
}
271-
: null,
275+
feedback: newRating ? { rating: newRating } : null,
272276
});
273277
274278
this.$message.success(newRating === 'like' ? '已点赞' : '已取消点赞');
@@ -280,7 +284,7 @@
280284
281285
// 踩消息
282286
async handleDislikeMessage(item) {
283-
console.log('handleDislikeMessage',item);
287+
console.log('handleDislikeMessage', item);
284288
if (item.placement !== 'start') return;
285289
// 强制隐藏tooltip并移除焦点
286290
if (this.$refs.dislikeTooltip) {
@@ -335,7 +339,12 @@
335339
const newRating = 'dislike';
336340
const content = this.feedbackContent || '';
337341
338-
await messageApi.feedbackMessage(this.currentMessageId, newRating, content, this.difyConfig.user);
342+
await messageApi.feedbackMessage(
343+
this.currentMessageId,
344+
newRating,
345+
content,
346+
this.difyConfig.user,
347+
);
339348
340349
// 通过事件向父组件传递反馈更新
341350
this.$emit('update-feedback', {

examples/src/views/DifyChat/components/BubbleListHeader.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
v-if="item.placement == 'start' && item.reasoning_content"
1010
:content="item.reasoning_content"
1111
:status="item.thinkingStatus"
12+
maxWidth="100%"
1213
class="thinking-chain-wrap"
1314
auto-collapse
1415
>

examples/src/views/DifyChat/components/MobileDrawer.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@
140140
}
141141
142142
.drawer-close-btn {
143+
width: 28px;
144+
height: 28px;
143145
padding: 8px;
144146
font-size: 16px;
145147
color: $--color-text-regular;
@@ -174,6 +176,8 @@
174176
}
175177
176178
.drawer-new-chat {
179+
width: 28px;
180+
height: 28px;
177181
margin: 16px;
178182
color: #4d6bfe;
179183
background-color: rgb(219, 234, 254);

examples/src/views/DifyChat/components/Sidebar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@click="$emit('toggle')"
1919
>
2020
<SvgIcon
21-
size="28"
21+
:size="28"
2222
name="toggle-right"
2323
color="rgb(139 139 139)"
2424
/>
@@ -28,7 +28,7 @@
2828
@click="$emit('new-chat')"
2929
>
3030
<SvgIcon
31-
size="28"
31+
:size="28"
3232
name="plus"
3333
color="rgb(139 139 139)"
3434
/>
@@ -47,7 +47,7 @@
4747
@click="$emit('toggle')"
4848
>
4949
<SvgIcon
50-
size="28"
50+
:size="28"
5151
name="toggle-left"
5252
color="rgb(139 139 139)"
5353
/>

0 commit comments

Comments
 (0)