mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 02:12:56 +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,
|
||||
});
|
||||
|
||||
if (curDocumentId && cache.component.has(componentCacheId)) {
|
||||
return cache.component.get(componentCacheId);
|
||||
if (curDocumentId && cache.component.has(componentCacheId) && (cache.component.get(componentCacheId).Comp === Comp)) {
|
||||
return cache.component.get(componentCacheId).LeafWrapper;
|
||||
}
|
||||
|
||||
class LeafHoc extends Component {
|
||||
@ -590,7 +590,10 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
||||
|
||||
LeafWrapper.displayName = (Comp as any).displayName;
|
||||
|
||||
cache.component.set(componentCacheId, LeafWrapper);
|
||||
cache.component.set(componentCacheId, {
|
||||
LeafWrapper,
|
||||
Comp,
|
||||
});
|
||||
|
||||
return LeafWrapper;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user