feat: 优化知识库与工作流卡片布局

- 统一紧凑卡片、完整标题与状态元信息展示

- 移除多余入口指示并将工作流分享操作前置
This commit is contained in:
2026-07-31 14:34:43 +08:00
parent f872eac1f9
commit a051dbacba
3 changed files with 260 additions and 51 deletions

View File

@@ -57,7 +57,6 @@ import { api } from '#/api/request';
import workflowIcon from '#/assets/ai/workflow/workflowIcon.png';
// import workflowSvg from '#/assets/workflow.svg';
import HeaderSearch from '#/components/headerSearch/HeaderSearch.vue';
import DesignIcon from '#/components/icons/DesignIcon.vue';
import CardList from '#/components/page/CardList.vue';
import PageData from '#/components/page/PageData.vue';
import PageSide from '#/components/page/PageSide.vue';
@@ -118,7 +117,7 @@ interface ApiFieldDoc {
}
const primaryAction: CardPrimaryAction = {
icon: DesignIcon,
showIndicator: false,
text: $t('button.design'),
permission: '/api/v1/workflow/save',
onClick: (row: any) => {
@@ -185,6 +184,18 @@ const actions: ActionButton[] = [
});
},
},
{
icon: Share,
text: $t('button.share'),
permission: '/api/v1/workflow/save',
placement: 'inline',
disabled: (row: any) =>
row.publishStatus !== 'PUBLISHED' || sharingWorkflowId.value === row.id,
loading: (row: any) => sharingWorkflowId.value === row.id,
onClick: (row: any) => {
shareWorkflow(row);
},
},
{
icon: Tickets,
text: $t('aiWorkflowExecRecord.moduleName'),
@@ -207,19 +218,6 @@ const actions: ActionButton[] = [
showApiInstruction(row);
},
},
{
icon: Share,
text: $t('button.share'),
permission: '/api/v1/workflow/save',
placement: 'menu',
disabled: (row: any) =>
row.publishStatus !== 'PUBLISHED' ||
sharingWorkflowId.value === row.id,
loading: (row: any) => sharingWorkflowId.value === row.id,
onClick: (row: any) => {
shareWorkflow(row);
},
},
{
icon: Download,
text: $t('button.export'),
@@ -1204,9 +1202,12 @@ function handleHeaderButtonClick(data: any) {
:data="pageList"
:primary-action="primaryAction"
:actions="actions"
density="compact"
meta-layout="compact"
:title-line-clamp="0"
>
<template #corner="{ item }">
<AiResourceCornerMeta publish-placement="below">
<template #details="{ item }">
<AiResourceCornerMeta>
<template #publish>
<div
class="workflow-publish-chip"
@@ -1371,10 +1372,9 @@ function handleHeaderButtonClick(data: any) {
align-items: center;
justify-content: center;
min-height: 22px;
min-width: 70px;
padding: 0 9px;
padding: 0 8px;
font-size: 11px;
font-weight: 600;
font-weight: 500;
line-height: 1;
border: 1px solid transparent;
border-radius: 999px;
@@ -1419,10 +1419,9 @@ function handleHeaderButtonClick(data: any) {
align-items: center;
justify-content: center;
min-height: 22px;
min-width: 70px;
padding: 0 9px;
padding: 0 8px;
font-size: 11px;
font-weight: 600;
font-weight: 500;
line-height: 1;
color: hsl(var(--text-strong));
background: transparent;