refactor(agent): 重构智能体页面布局和样式

-调整了智能体卡片的布局结构,优化了标题和描述的显示方式
- 改进了历史对话的展示样式,增加了滚动指示器
- 统一了标签和图标的样式,提升了视觉一致性
- 优化了搜索框和卡片列表的样式,提高了用户体验
This commit is contained in:
林志军
2025-07-28 13:47:40 +08:00
parent 7cdc7c1e44
commit 8ed40110ae
8 changed files with 294 additions and 226 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="agent-wrap">
<a-input
style="float: right; width: 300px"
style="float: right; width: 400px"
v-model="query.name"
@blur="getData()"
placeholder="搜索智能体"
@ -12,7 +12,7 @@
<icon-search />
</template>
</a-input>
<div v-for="(item, index) in list" :key="index">
<div v-for="(item, index) in list" :key="index">
<span class="span-title">{{ item.name }}</span>
<a-row class="grid-demo" :gutter="24" v-if="item.agent_products.length > 0">
<a-col :span="3" v-for="(product, k) in item.agent_products">
@ -32,7 +32,7 @@
<div class="card-footer">
<div
:class="['status-tag', product.type === 1 ? 'blue-tag' : 'red-tag']"
:style="{ background: product.type === 1 ? 'var(--Functional-Blue-1, #E6F3FF)' : 'var(--Functional-Red-1, #FFE9E7)' }"
:style="{ background: product.type === 1 ? 'var(--Functional-Blue-1, #F0EDFF)' : 'var(--Functional-Red-1, #FFE9E7)' }"
data-size="mini-20px"
>
<img

View File

@ -34,29 +34,42 @@
}
.card-image-container {
width: 99%; // 设置宽度
height: 200px; // 设置高度,与宽度一致,保持正方形比例
width: 99%;
height: 150px;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden; // 防止图片超出容器
overflow: hidden;
}
.card-image {
width: 100%;
height: 100%;
border-radius: 7px;
object-fit: cover; // 确保图片按比例缩放并裁剪
object-fit: cover;
}
.card-content {
align-self: stretch;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
gap: 4px;
flex: 1;
overflow: hidden;
.card-title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-description {
height: 40px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.card-title {
color: var(--Text-1, #211f24);
font-size: 16px;
@ -124,7 +137,7 @@
.blue-tag {
.status-text {
color: var(--Functional-Blue-6, #007BFF);
color: var(--Functional-Blue-6, #6D4CFE);
}
}