-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
[Bug] Does not recognize a component unless it has a root element #49
Comments
This is a current implementation limitation. We injected a
|
@webfansplz , how about using onVnodeMounted instead, I guess it doesn't fall-through, in fact, in the rendered dom, the attributes won't show up at all (and shall be clean) if the mapping is maintained elsewhere, for eg, a windows object. <template>
<PrimeDropdown
v-model="appStore.locale"
:options="locales"
:onVnodeMounted="pgUpdateElCache(/* file, line no, pos */)" // Maintain the source-dom mapping on some windows object
/>
</template> Usage references: If this is a potential solution, then the next challenge is how to handle & avoid duplicate usage of onVnodeMounted (or |
I was studying the source-dom mapping techniques and noticed Johnson's vue-preview (previously @volar/preview) https://twitter.com/johnsoncodehk/status/1507024137901916161 is also using a similar solution of using vNode* events https://github.com/johnsoncodehk/vue-preview/blob/master/packages/core/bin/vite.js#L35, so this approach is promising. |
Thanks for the reference and suggestion· We actually discussed it with the team before, I think we need to rehash this and resolve it. |
Curious to know the outcome, thanks :-) |
+1 |
It seems that it does not recognize a component unless I add a root element wrapper like a
<div>
and then it works.For example, if my component looks like this, then it does not recognize it:
But if I add a root
<div>
then it is recognized:vue: 3.2.37
vite: 3.0.7
vite-plugin-vue-inspector: 3.3.0
Here is a screencast demo where you can see that as I hover over the Language Switcher it does not recognize it:
Kazam_screencast_00047.mp4
The text was updated successfully, but these errors were encountered: