-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Creating a component named map should warn the user (as with button) #8025
Comments
Because you're using the in-browser templates, self-closing tags are not working as expected, so it's not that anything containing map isn't working, it's that things are not passed to Vue as you expect. About the |
Ah, I forgot that |
it does work, you need to use |
Hmm ok. Well, it seems uppercase works for the first character.
|
You should checkout the style guide section of the docs, it will help you with that 🙂 |
Ok, thanks. In any case, some warnings would be useful. I wasted quite a few hours trying to figure out what was wrong. |
@posva Comparison of reserved Vue HTML tags vs specs. `map` is already in there.
edited by @posva: collapsed the table as it took too much space |
Warnings only work when components are registered globally e.g. Vue.component('map', () => import('@js/components/Map')) When imported and registered locally in <script>
import Map from '@js/components/Map';
export default {
components: {Map}
}
</script>
<template>
<div><map/></div>
<template> |
@pqvst If you use in-DOM template, Vue cannot warn you about the use of something like |
I'm thinking of working on this. Will upload a PR in a while! |
Ok, so it's not working because of the browser by default setting the tag names to lowercase but vue is still looking for the elements with the upper case letters resulting in it not working and here is proof: https://jsfiddle.net/e2yxoomh/50/ you just need to replace |
Hi guys, is there anything needed for this Issue? It has bee open for over a year. I can work on it if you want too. |
Seems intresting. Think to work on it |
is there anything needed for this issuse? |
Yeah the first Letter should be uppercase |
Version
2.5.15
Reproduction link
https://jsfiddle.net/e2yxoomh/2/
Steps to reproduce
Create a component that includes the word "map" (case insensitive). For example:
What is expected?
I expect these to work, or at least give me some sort of error message.
What is actually happening?
Nothing happens. The components do not render. There is no error message.
The text was updated successfully, but these errors were encountered: