Skip to content

Commit

Permalink
feat: 修正css时序及重复patch的问题(#568) (#570)
Browse files Browse the repository at this point in the history
* feat: 修正css时序及重复patch的问题(#568)

* feat: 恢复patchCssRules的调用
  • Loading branch information
ljquan authored Jun 30, 2023
1 parent bc08ed9 commit f9d222c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/wujie-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,13 @@ export async function startApp(startOptions: startOptions): Promise<Function | v
*/
sandbox.unmount();
await sandbox.active({ url, sync, prefix, el, props, alive, fetch, replace });
// 正常加载的情况,先注入css,最后才mount。重新激活也保持同样的时序
sandbox.rebuildStyleSheets();
// 有渲染函数
sandbox.lifecycles?.beforeMount?.(sandbox.iframe.contentWindow);
iframeWindow.__WUJIE_MOUNT();
sandbox.lifecycles?.afterMount?.(sandbox.iframe.contentWindow);
sandbox.mountFlag = true;
sandbox.rebuildStyleSheets();
return sandbox.destroy;
} else {
// 没有渲染函数
Expand Down

0 comments on commit f9d222c

Please sign in to comment.