From b7f3ae285482ac3b9c66ed72ac3e4a70c34d8efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com> Date: Mon, 18 May 2026 10:00:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=AB=AF=E7=B1=BB=E5=9E=8B=E6=A3=80=E6=9F=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为分页数据列表补充明确行类型 - 修正插件数组默认值解析的类型转换 - 删除 tinyflow 未使用辅助函数 --- easyflow-ui-admin/app/src/components/page/PageData.vue | 6 ++++-- .../app/src/views/ai/plugin/PluginRunParams.vue | 7 ++++--- .../packages/tinyflow-ui/src/utils/workflowNodeFields.ts | 4 ---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/easyflow-ui-admin/app/src/components/page/PageData.vue b/easyflow-ui-admin/app/src/components/page/PageData.vue index a1276db..a0c8466 100644 --- a/easyflow-ui-admin/app/src/components/page/PageData.vue +++ b/easyflow-ui-admin/app/src/components/page/PageData.vue @@ -16,6 +16,8 @@ interface PageDataProps { requestClient?: any; } +type PageDataRow = Record; + const props = withDefaults(defineProps(), { pageSize: 10, pageSizes: () => [10, 20, 50, 100], @@ -24,7 +26,7 @@ const props = withDefaults(defineProps(), { }); // 响应式数据 -const pageList = ref([]); +const pageList = ref([]); const loading = ref(false); const queryParams = ref>({}); @@ -83,7 +85,7 @@ const patchRowById = ( patch: Record, ): boolean => { const rowIndex = pageList.value.findIndex( - (item: Record) => String(item?.id ?? '') === String(id ?? ''), + (item) => String(item?.id ?? '') === String(id ?? ''), ); if (rowIndex === -1) { return false; diff --git a/easyflow-ui-admin/app/src/views/ai/plugin/PluginRunParams.vue b/easyflow-ui-admin/app/src/views/ai/plugin/PluginRunParams.vue index c1d883d..c5cc5f8 100644 --- a/easyflow-ui-admin/app/src/views/ai/plugin/PluginRunParams.vue +++ b/easyflow-ui-admin/app/src/views/ai/plugin/PluginRunParams.vue @@ -162,10 +162,11 @@ const parseWorkflowNodeValue = (node: TreeTableNode): any => { }; const parseArrayValue = (node: TreeTableNode): any[] => { - if (Array.isArray(node.defaultValue as any)) { - return node.defaultValue as any[]; + const defaultValue = node.defaultValue as unknown; + if (Array.isArray(defaultValue)) { + return defaultValue; } - const raw = String(node.defaultValue || '').trim(); + const raw = String(defaultValue || '').trim(); if (!raw) { return []; } diff --git a/easyflow-ui-admin/packages/tinyflow-ui/src/utils/workflowNodeFields.ts b/easyflow-ui-admin/packages/tinyflow-ui/src/utils/workflowNodeFields.ts index 850c4c4..726bc65 100644 --- a/easyflow-ui-admin/packages/tinyflow-ui/src/utils/workflowNodeFields.ts +++ b/easyflow-ui-admin/packages/tinyflow-ui/src/utils/workflowNodeFields.ts @@ -171,10 +171,6 @@ function isCollectionOutputParameter(parameter?: Parameter | null) { ); } -function getCollectionDisplayName(label: string) { - return label.endsWith('.[]') ? label : `${label}.[]`; -} - function buildCollectionAwareLabel( referenceLabel: string, parentLabel: string,