in packages/lowcode-plugin-inject/src/utils.tsx [141:161]
export async function getInjectedResource(type, injectOptions?: InjectOptions) {
const urls = await getInjectUrls(type, undefined, injectOptions);
await loadComponentFromSources(urls);
return window[arrayFlag].filter((item) => {
const _item = item.default || item;
if (!type) {
return true;
}
if (_item.type && typeMap[type].indexOf(_item.type) < 0) {
return false;
}
if (!_item.type && _item.name && _item.name.indexOf(`@ali/${type}-`) < 0) {
return false;
}
return true;
}).map((item) => {
const _item = item.default || item;
_item.module = getModule(_item.module);
return _item;
});
}