Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

再次注册组件时候,rootComponent还是上一次的注册的rootComponent, 已修改了组件路径 #40

Closed
Chenlangwei opened this issue Oct 24, 2019 · 1 comment

Comments

@Chenlangwei
Copy link

Chenlangwei commented Oct 24, 2019

这是第一次注册组件
image
打印出的dom如下
image
这是第二次注册的dom
image
打印的dom如下
image
第二次打印出rootComponent是第一注册component返回的实例,rootComponent实例没有更
第二次注册返回component的innerHTML预期应该为

<wx-view class="x-class x-badge">
    <<wx-view class="x-badge-dot">100</<wx-view>
</wx-view>

@JuneAndGreen
Copy link
Contributor

JuneAndGreen commented Oct 29, 2019

如果是同样的路径且是使用 jest 的话,可能是触发了这个 jestjs/jest#5120,需要调下 jest.resetModules()。如果改变了路径还有问题,我这边没能复现,能否给下能直接复现问题的 demo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants