Vue: The template root requires exactly one element. Solution

Vue: The template root requires exactly one element. Solution

Solution: Add a root tag under the template tag, and you can place multiple tags under the root tag without error.
For example:

<template>
  <div>
  <div id="nav">
    <router-link to="/">Home</router-link> |
  </div>
  <router-view/>
  </div>
</template>

Supongo que te gusta

Origin blog.csdn.net/Stars_in_rain/article/details/122404164
Recomendado
Clasificación