Iview: [Bug Report] Do not use built-in or reserved HTML elements as component id

Created on 27 Aug 2017  ·  3Comments  ·  Source: iview/iview

With Vue 2.4.x, I'm seeing the following warnings when importing the Select and Option components import { Select, Option } from 'iview/src/components/select':

Do not use built-in or reserved HTML elements as component id: Option
Do not use built-in or reserved HTML elements as component id: Select

These are valid warnings and I believe the components should be renamed to avoid collision with reserved HTML elements. Thanks.

Most helpful comment

@albertchan iView registers the Select and Option components with i- prefix, so you can use i-select and i-option (example).

All 3 comments

@albertchan iView registers the Select and Option components with i- prefix, so you can use i-select and i-option (example).

If you insist on using it as needed, you can rename it

{
    components: { iSelect: Select }
}

is the name: '' all we have to change? can the filename still include an html-like name? e.g. 'Footer.vue', and also in the import Footer from ./components/Footer do these also have to be renamed? or only in Vue instance name definition

Was this page helpful?
0 / 5 - 0 ratings