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.

运行代码时,一直报错:

经过查询后才知道,vue模板只能有一个跟对象

我是这样写的

最后修改为

就可以正常运行了

 

posted @ 2019-01-17 14:46  秀&莹&锐  阅读(143)  评论(0编辑  收藏  举报