![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图片上传
永远的个初学者
这个作者很懒,什么都没留下…
展开
-
element 一次性上传多行多张图片
<el-dialog class="dialog_1" title="上传图片" :visible.sync="dialogFormVisible" :close-on-click-modal='false' :close-on-press-escape='false' center @closed='closed_cli'> <e...原创 2020-04-17 17:26:00 · 1161 阅读 · 0 评论 -
element上传函数带参数,自定义传参
下面这是标签可以看出来 :http-request="(params) =>beforeMasterPictureUpload(params,‘ruleForm’,fileList0)"http-request 传递参数的方法 是可以这样写的,其他方法一样,但是如果写错少些可能会导致覆盖原来的方法。<el-upload :class="{hidesse:hideUpload0,...原创 2020-04-15 15:48:24 · 4656 阅读 · 0 评论 -
some()函数使用实例
beforeAvatarUpload(file) { console.log(file) console.log(file.type) console.log(file.type === 'image/gif') const idJPG = ['image/jpeg', 'image/gif', 'image/png', 'image/bmp'...原创 2019-12-02 09:58:52 · 757 阅读 · 0 评论 -
element 上传图片限制图片尺寸大小以及格式,贴源码,写的很清楚,已优化
// 主图上传之前 beforeMasterPictureUpload(file) { let param = new FormData(); //创建form对象 this.fileList.forEach(file =&amp;amp;amp;amp;gt; { param.append('files', file.raw, file.raw.name); //此处一...原创 2019-01-26 17:55:05 · 2557 阅读 · 1 评论