vue项目中出现The template root requires exactly one element的报错,是因为vue的template里只能有一个根节点,所以在中插入第二个元素就会报错,如图:
解决方法:
将中的元素用一个大的
包起来,这样就可以在里面添加多个元素了,如图:
报错解决。
报错解决。
vue项目中出现The template root requires exactly one element的报错,是因为vue的template里只能有一个根节点,所以在中插入第二个元素就会报错,如图:
解决方法:
将中的元素用一个大的