![](https://img-blog.csdnimg.cn/20190927151101105.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Vue
Vue
、Edgar
Coding with fun
展开
-
antv 报错Chart.data is not a function
这个是因为版本的问题,在不指定版本的情况下,由于npm安装的antv的版本为3.x.x, 我们可以使用v3中的source代替data方法同时我们也可以使用v4版本npm install @antv/g2@4.0.7原创 2020-05-17 09:53:36 · 4264 阅读 · 0 评论 -
axios 上传文件时展示进度条
在config中监听onUploadProgress事件即可,中间有个progressEvent,从中我们可以获取到上传进度 this.$axios .post("/api/file/uploadfile", form, { headers: { "Content-Type": "multipart/form-data", }, onUploadProgress: (原创 2020-05-15 21:07:44 · 6905 阅读 · 0 评论 -
v-for遍历数组使用v-if或者v-show动态显示某个组件
我是在antdv的a-list中间使用的,类似与一个v-for <a-list item-layout="vertical" size="large" :pagination="pagination" :data-source="listData" :locale="{ emptyText: '暂无回答' }" :loading="loading" >原创 2020-05-12 22:23:13 · 911 阅读 · 0 评论 -
antdv 组件手动上传文件和表单内容到 springboot后端
前端将获取到的文件列表中的originFileObj上传到后端,后端通过MultipartHttpServletRequest接受即可贴代码如下:<template> <Profile :selectedKeys="thisSelectedKeys" :open-keys="thisOpenKeys"> <template v-slot:content...原创 2020-05-06 13:09:14 · 2157 阅读 · 0 评论 -
Component template should contain exactly one root element
使用下面代码的组件的时候<div>{{message}}</div><ul><li v-for="a in array">{{a}}</li>{{test}}</ul>会如上错误,主要是因为每个组件模板只能包含一个根元素 我们可以加一个<div></div>来包含这个组件内容<di...原创 2020-04-06 15:26:20 · 110 阅读 · 0 评论