From 7d0b4bd1bda6ab6c39df24462c2e8a0df0a3b4c4 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周三, 07 5月 2025 11:30:47 +0800 Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo --- HIAWms/web/src/widgets/hook.ts | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/HIAWms/web/src/widgets/hook.ts b/HIAWms/web/src/widgets/hook.ts new file mode 100644 index 0000000..91060c0 --- /dev/null +++ b/HIAWms/web/src/widgets/hook.ts @@ -0,0 +1,17 @@ +export const getEntityNames = ( + widgetsModules: Record< + string, + { + default: Record<string, any> + name: string + } + > +) => { + const entityNames: string[] = [] + Object.entries(widgetsModules).forEach(([path, fileInfo]) => { + if (fileInfo.default) { + entityNames.push(fileInfo.default?.name || fileInfo.name) + } + }) + return entityNames +} -- Gitblit v1.9.3