-
Notifications
You must be signed in to change notification settings - Fork 187
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
Vuetify with Vue-custom-element Breaks #86
Comments
It's just warning stating that you didn't register with Vue Please prepare JSFiddle or Code Sandbox (https://codesandbox.io/) example. Regards! |
I have registered a Vuetify component with Vue-custom-element |
So this is just a warning described in https://github.com/karol-f/vue-custom-element#caveats page. If Vuetify elements work you don't have to get rid of this warning but you could as described in link above. If Vuetify components does not work please make sure you have added them to page. Alternatively you can just use |
no.. Normal vuetify component is working. But when i register a vuetify component with custom element and render that in the html it is not working Vue.customElement('custom-hello-world',HelloWorld) |
i want to use that vuetify component in a project where i don't have vue js |
I suggest using what you do already - You can check how I used Element.io in Regards! |
Feel free to ask other questions! |
So you are saying that Vue-Custom-Element is not ready to handle vuetify component yet. If yes, do you plans for that in the future |
It is ready but as stated in documentation you have to create Custom Elements from each and every Vuetify component you want to use as Custom Element. Did you register There might be some drawbacks as in current version of Please prepare demo with exact problem so I could help. Regards! |
Sorry karol could you please help me here. Uploaded my files here. I am rendering this
in index.html it is not rendering. |
just look at the problems |
Yes, you didn't register anywhere Just add Vuetify to main.js file like in Vuetify docs:
Check https://codesandbox.io/s/32v82v04xq And it works. Regards |
Thanks Karol. It worked now. I think i created the project with the scaffolding template of vuetify. That is the problem. Even there i had this 2 lines. But it didn't work. Now i created with vue init webpack template. It works perfectly. But there is an issue again. If you register 2 custom vuetify component. Then only one is appearing. Not the both. Though i have displayed both the html tags in the index.html.
The only difference in both the components is the below sentence. First, 2nd problem . Then, write the code. - |
@Meenakshise Can you share the not working example? |
oh.. same sandbox link |
Is that the expected behavior |
I can see that it's working - https://codesandbox.io/s/8yj5rpjyol Don't forget to use proper HTML - don't use self closing Custom Element tags in HTML. |
No it is not working Karol. even after using proper html
|
Please check this link https://codesandbox.io/s/50v0pzyqql I could see only one component rendered |
@Meenakshise Because you didn't close HTML tags properly - https://codesandbox.io/s/0pj0xr2wv It should be
Regards |
yes Karol i figured it out actually. Thanks a lot for your help throughout. It is working perfectly now.. |
@Meenakshise Great, regards |
The links are borken, have anyone a working example with vuetify and custom components? |
@do-web Hi, sorry for the inconvenience - do You have specific problem? Can You prepare repo on e.g. CodeSandbox? |
I'am looking for a best practice to use vuetify in custom components. |
@do-web Just use it as You would in normal Vue component. There's no need to make every one custom element. Treat vue-custom-element custom elements as mini apps. |
@karol-f If i try this:
iam getting errors: Error in nextTick: "TypeError: Cannot read property 'smAndDown' of undefined" In test-view i use vuetify components |
@do-web I would like to help but without proper CodeSandbox or Github repo with example it's hard to solve anything. Regards |
@karol-f Do you know of this issue? It seems related to this as it is a fork vue-web-component. I am having trouble with the nested carousel items not rendering. https://github.com/lalzart/shopify-vue/blob/master/src/vue/components/landing-page/A |
It is really a very good package when you want to integrate it to the existing application. A big thanks to you..
I am using Vuetify in my vue project. In that case i am getting this error. I think it is unable to recognize any of the vuetify elements. Is there a work around for this to convert the vuetify template to html template before custom element parses it? Or can you do this as part of your package itself.
vue.esm.js?efeb:578 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> at src\components\HelloWorld.vue
Please let me know.
The text was updated successfully, but these errors were encountered: