报错:Component you should use exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

翻译:组件应该只使用一个根元素。 如果您在多个元素上使用v-if,请使用v-else-if来链接它们。

原因:组件中<template></template>标签内缺少根元素

解决:添加根元素<div></div>
<template>
    <div>
        内容
    </div>
</template>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-19
猜你喜欢
  • 2021-04-25
  • 2021-06-27
  • 2021-08-02
  • 2022-12-23
  • 2021-06-30
  • 2021-06-26
  • 2022-12-23
相关资源
相似解决方案