vue报错: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文件中引入了 element-ui 的 table 和 pagination 组件后,报错: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.【翻译:组件模板应该只包含一个根元素。 如果您在多个元素上使用v-if,请使用v-else-if来代替它们。】
报错文件如下:
修改为:
成功显示:
vue报错: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编译报错 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添加标签的时候编译报错,报错如下: Component template should contain exactly one root element. If you are u ...
- VUE之命令行报错: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 解决办法
Failed to compile. ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-5992 ...
- 组件嵌套时报: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的组件(模板)只能有一个根节点,即.vue文件中的<template>标签下只能有一个子元素. 因此,建议大家在写.vue组件的 ...
- 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模板只能有一个跟对象 我是这样写的 最后修改为 就可以正常运行了
- vue父子组件嵌套的时候遇到 - Component template should contain exactly one root element. If you are using v-i
转自:https://blog.csdn.net/yangyiboshigou/article/details/72084619
- 【错误总结】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.
大致意思是因为模板里面应该包含一个根元素,使用组件的时候应该用div或p标签包起来
- vue 报错 :属性undefined(页面成功渲染)
vue 报错:Cannot read property 'instrumentId' of undefined" 相关代码如下: <template> ... <span& ...
- Vue报错——“Trailing spaces not allowed”
在VSCode中开发Vue 报错:“Trailing spaces not allowed” 这是空格多了,删除多余的空格就可以了
- Vue 报错Error in render: “TypeError: Cannot read properties of null (reading ‘xxx’)” found in
前端vue报错 [Vue warn]: Error in render: "TypeError: Cannot read properties of null (reading 'name' ...
随机推荐
- Vue.config.productionTip = false 是什麽意思
阻止启动生产消息,常用作指令. 阻止启动生产消息 這又是什麽意思? 看下效果 Vue.config.productionTip = false Vue.config.productionTip = t ...
- Hello 2019题解
Hello 2019题解 题解 CF1097A [Gennady and a Card Game] map大法好qwq 枚举每一个的第\(1,2\)位判是否与给定的重复即可 # include < ...
- Centos 7.x 设置Lvs+ Keepalived
[实验环境] Centos 7.2 Nginx 以下为本次试验所使用的地址: VIP:192.168.136.100 LVS-1:192.168.136.170 LVS-2:192.168.136. ...
- (转)mysql更改数据目录
mysql 更改默认数据目录 http://www.cnblogs.com/chenny7/p/3642363.html 本文主要介绍在CentOS下通过yum命令安装MySQL之后,如何移动默认数据 ...
- java把一段时间分成周,月,季度,年的时间段
package com.mq.test.activeMQ; import java.text.DateFormat; import java.text.ParseException; import j ...
- windows 家庭版 开启Hyper-V
windows 家庭版无法开启Hyper-V ,建议升级成专业版.
- Beta冲刺(2/4)
队名:福大帮 组长博客链接:https://www.cnblogs.com/mhq-mhq/p/11990570.html 作业博客 : https://edu.cnblogs.com/campus/ ...
- appium 小程序自动化测试
https://www.cnblogs.com/yoyoketang/p/9144987.html adb shell su ACTIVITY com.tencent.mm/.plugin.appbr ...
- TynSerial类介绍
TynSerial类介绍 TynSerial是咏南中间件封装的,支持数据二进制序列(还原)的类. 支持WINDOWS.LINUX.MAC.IOS.ANDROID. 支持D6及以上版本. 支持TCP/H ...
- CV2——学习笔记-图像分类
1.图像分类 • 2.神经网络原理 • 1.卷积神经网络介绍 • 2.利用caffe搭建深度网络做图像分类 挑战:光照变化+形变.类内变化. 标签.预测函数,泛化能力. 如何提高泛化能力?需要用图像特 ...