简体   繁体   中英

[Vue warn]: Unknown custom element: <testimonial-photo-inner>

I have just installed VueJS on my website and I'm getting tonnes of console errors like the one above. I am not trying to create any Vue components (yet) but my website does contain a number of custom HTML tags.

Does Vue treat any custom HTML tage (eg not one in the HTML spec) as something it needs to compile and will it always complain about tags it doesn't recognise?

Is it possible to switch theses warning off?

Please note: This is not a duplicate of Vue js unknown custom element

The user there is actually trying to create a Vue component.

You can use the ignoreElements configuration parameter to have Vue ignore elements that it should not touch.

So in your code you would likely want to add:

Vue.config.ignoredElements = [
  'testimonial-photo-inner'
]

And include any other tags you might be using that you do not want Vue to touch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM