fix: add unique key

This commit is contained in:
wuyue.xht 2020-03-16 16:36:59 +08:00
parent edf14c1bc6
commit e48307dc6d

View File

@ -66,7 +66,11 @@ export default abstract class Provider {
if (!pageId) {
return null;
}
return createElement(LazyComponent as any, { getPageData: async () => await this.getPageData(pageId), ...props });
return createElement(LazyComponent as any, {
getPageData: async () => await this.getPageData(pageId),
key: pageId,
...props,
});
}
public createApp() {