-
Notifications
You must be signed in to change notification settings - Fork 83
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
Vue3 scale events… #490
Comments
a comment by myself... after study some documentations I figure out that vue3 cannot handle CustomEvents in camelCase. So it seems that I use addListener('scaleChange', ...) Correct me if I am wrong... |
Hello @rbartholomay Thank you for your question. As far as I know, you can do
I would rephrase this like this: Vue 3 is supported, it fully supports web components/custom elements. The soon-to-be-deprecated proxy package (scale-components-vue) only supports Vue 2. Regarding the warnings, you can suppress them by following this guide in the official Vue 3 docs. This is also mentioned in the new docs (link to file in PR), as you already found out :) The warning has to do with Vue trying to treat Scale components as Vue components while parsing the templates. With the configuration you let Vue know they are custom HTML tags and not actual Vue components. |
Hey @rbartholomay I need to apologise because I'm doing some more research. |
I am new to vue3… … but if I understand the docu correctly vue3 will transform all props from camelCase to kebabCase. But only for props, not for events in Custom-Components. |
This could be a bug, see vuejs/core#2841 The docs say you can kebab-case the event names for custom event names ( |
Vue 3 will turn event names into kebab-case: https://github.com/vuejs/vue-next/blob/master/packages/runtime-dom/src/modules/events.ts#L104 So Need to figure out whether this is 100% intentional. |
@rbartholomay, to answer to your original question, for now you have to use We'll be working on a fix for this, to make it possible to use the Vue syntax in the immediate future, without breaking changes. |
Ok, thanks for clarification! |
Hi there,
i know that vue3 is currently not supported but can be used without the specific scale-components-vue package.
I try this and it runs (with some warnings) but I cannot capture the custom event line @Scalechange and so on.
I read the pull request update Vue and Angular docs and try this on a plain new vue project, but the custom elements are not recognized and handled the events.
Is there a way to capture the scale events or must I use el.addListener(…) for handling this in vue3?
Kind regards
The text was updated successfully, but these errors were encountered: