fix: 修复管理端类型检查错误

- 为分页数据列表补充明确行类型

- 修正插件数组默认值解析的类型转换

- 删除 tinyflow 未使用辅助函数
This commit is contained in:
2026-05-18 10:00:41 +08:00
parent 2907acac95
commit b7f3ae2854
3 changed files with 8 additions and 9 deletions

View File

@@ -16,6 +16,8 @@ interface PageDataProps {
requestClient?: any;
}
type PageDataRow = Record<string, any>;
const props = withDefaults(defineProps<PageDataProps>(), {
pageSize: 10,
pageSizes: () => [10, 20, 50, 100],
@@ -24,7 +26,7 @@ const props = withDefaults(defineProps<PageDataProps>(), {
});
// 响应式数据
const pageList = ref([]);
const pageList = ref<PageDataRow[]>([]);
const loading = ref(false);
const queryParams = ref<Record<string, any>>({});
@@ -83,7 +85,7 @@ const patchRowById = (
patch: Record<string, any>,
): boolean => {
const rowIndex = pageList.value.findIndex(
(item: Record<string, any>) => String(item?.id ?? '') === String(id ?? ''),
(item) => String(item?.id ?? '') === String(id ?? ''),
);
if (rowIndex === -1) {
return false;

View File

@@ -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 [];
}

View File

@@ -171,10 +171,6 @@ function isCollectionOutputParameter(parameter?: Parameter | null) {
);
}
function getCollectionDisplayName(label: string) {
return label.endsWith('.[]') ? label : `${label}.[]`;
}
function buildCollectionAwareLabel(
referenceLabel: string,
parentLabel: string,