style(agent): 优化工作流页面样式

- 移除工作流卡片标题的自定义颜色样式- 优化 Markdown 渲染容器的样式,确保图片自适应- 调整历史记录项弹出框的样式,使其背景透明无圆角
This commit is contained in:
林志军
2025-08-01 16:21:46 +08:00
parent 5199f79959
commit 27429c9c05
2 changed files with 8 additions and 8 deletions

View File

@ -42,7 +42,7 @@
{{ item.title }} {{ item.title }}
</div> </div>
<a-trigger trigger="click" position="bottom" :auto-fit-position="true" :unmount-on-close="true"> <a-trigger trigger="click" position="bottom" :auto-fit-position="true" :unmount-on-close="true">
<SvgIcon size="12" name="svg-more" class="color-#6D4CFE" style="float: right" /> <SvgIcon size="12" name="svg-more" style="float: right" />
<template #content> <template #content>
<div class=""> <div class="">
<div class="history-item-dropdown"> <div class="history-item-dropdown">
@ -174,7 +174,7 @@ const workFlowRes = reactive({
const renderedMarkdown = computed(() => { const renderedMarkdown = computed(() => {
if (workFlowRes?.output) { if (workFlowRes?.output) {
const rawHtml = marked.parse(workFlowRes.output || ''); const rawHtml = marked.parse(workFlowRes.output || '');
return DOMPurify.sanitize(rawHtml); // 防止 XSS 攻击 return DOMPurify.sanitize(rawHtml);
} }
return ''; return '';
}); });
@ -300,4 +300,5 @@ onMounted(() => {
<style scoped lang="scss"> <style scoped lang="scss">
@import './style.scss'; @import './style.scss';
</style> </style>

View File

@ -299,17 +299,15 @@
.res { .res {
flex: 1 1 0; flex: 1 1 0;
align-self: stretch;
padding: 32px; padding: 32px;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: 32px; gap: 32px;
display: inline-flex; display: inline-flex;
.markdown-container { :deep(.markdown-container img) {
max-width: 100%; max-width: 100% !important;
overflow-x: auto; max-height: auto !important;
word-wrap: break-word;
} }
} }
} }
@ -343,7 +341,8 @@
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
border-radius: 0;
background-color: transparent;
&:hover { &:hover {
background: var(--BG-200, #F2F3F5); background: var(--BG-200, #F2F3F5);
} }