[Vue warn]: Error compiling template: Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

发布时间 2023-06-11 17:29:50作者: 哩个啷个波

报错信息:

[Vue warn]: Error compiling template:

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

2 |
3 |
4 |
| ^^^^^^^^^^^^^^^
5 |
| ^^^^^^^^^^^^

found in

--->

问题原因:

解决方式: