In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the template error problem in vue". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "how to solve the template error problem in vue" together.
template error
It's written purely to commemorate how stupid
template:` I'm button one. `,
About the HTML written in template, experienced a series of problems such as error, console reflected character string is not complete, syntax errors, etc., check all kinds of blogs, after checking the source code of other frameworks, only to find that there is no problem with syntax, js import is no problem, there is a problem
In the template, it is used.
It's the `next to the number 1, not the single quotation mark!!!
I tried to find a bug for more than an hour...
vue error reporting problem
The template root requires exactly one element
The root template must have an exact element.
Template tags are used in vue components. In template, a tag element is needed to wrap other tag elements, because template tags are not parsed by DOM, and DOM elements are hidden when generated, and components must have only one root node.
//helloWorld.vue//correct spelling This is H2. This is H2. I'm helloWorld //error, error will be reported. This is H2. This is H2. I'm helloWorld
This outermost tag element can only have one way consistent with component usage in React.
In React, when the render function returns the component, the outermost layer must also have only one tag element, which seriously wraps the other tags, otherwise an error will be reported.
//helloWorld.jsxrender(){ return( This is H2. This is H2. I'm helloWorld )} Thank you for reading, the above is the content of "how to solve the template error problem in vue", after learning this article, I believe that everyone has a deeper understanding of how to solve the template error problem in vue, and the specific use situation needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.