mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:25:48 +00:00
feat: add new cache from diff origin component
This commit is contained in:
parent
7decc3a8db
commit
19935cfc93
@ -193,8 +193,8 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
|||||||
getNode,
|
getNode,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (curDocumentId && cache.component.has(componentCacheId)) {
|
if (curDocumentId && cache.component.has(componentCacheId) && (cache.component.get(componentCacheId).Comp === Comp)) {
|
||||||
return cache.component.get(componentCacheId);
|
return cache.component.get(componentCacheId).LeafWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LeafHoc extends Component {
|
class LeafHoc extends Component {
|
||||||
@ -590,7 +590,10 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
|||||||
|
|
||||||
LeafWrapper.displayName = (Comp as any).displayName;
|
LeafWrapper.displayName = (Comp as any).displayName;
|
||||||
|
|
||||||
cache.component.set(componentCacheId, LeafWrapper);
|
cache.component.set(componentCacheId, {
|
||||||
|
LeafWrapper,
|
||||||
|
Comp,
|
||||||
|
});
|
||||||
|
|
||||||
return LeafWrapper;
|
return LeafWrapper;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user