fix emitting mounted event

This commit is contained in:
Pig Fang 2020-03-26 11:49:34 +08:00
parent 9a29df2a07
commit 375fcb38b4

View File

@ -40,7 +40,7 @@ function loadModules() {
? document.querySelector(route.el)
: route.el
ReactDOM.render(<Root />, c, () => {
emitter.emit('mounted', { el: route.el })
setTimeout(() => emitter.emit('mounted', { el: route.el }), 0)
})
}
if (route.component) {