[Vue error] the solution to the template root requires exactly one element error reporting

Error content
Vue error: the template root requires exactly one element

See the following figure for details:

error information in vscode

error information in node

Error reason
Vue only allows one root node in the template.

Solution

Add a <div> tag to <template>, after that all the components will be added to <div> to solve the problem.

Read More: