handleSave() {
        const formData = new FormData();
        /* eslint-disable */
        for (let key in this.dataInfo) {
          if (Object.prototype.hasOwnProperty.call(this.dataInfo, key)) {
            formData.append(key, this.dataInfo[key]);
          }
        }
        let para = {
        			headers: {'content-type': 'multipart/form-data'},
					style: "styleType",
				    path : "paths",
				    city : 1
					};	
        this.$http.post('http://img.zeju.cn/zejuimg/img/upload', formData, para)
          .then((res) => {
            console.log(res);
          });
      },

  

<el-upload
	class="avatar-uploader"
       action=""						 										  
	:show-file-list="false"
	:on-success="handleAvatarSuccessLogoPc"	
	:on-error="handleAvatarErrorLogoPc"								  	  
	:on-progress="handleProgressLogoPc"
	:before-upload="beforeUploadLogoPc"
	:http-request="handleSave">
	<img v-if="imageUrlLogoPc" :src="imageUrlLogoPc" class="avatar">
	<i v-else class="el-icon-plus avatar-uploader-icon" ref="plusIcon"></i>
	<p >点击上传图片</p>
	<el-progress v-show="showFlagLogoPc" type="circle" :percentage="progressingLogoPc" :status="statusLogoPc" style="position: absolute;top:10%;left:15%;" ></el-progress>
</el-upload>

  

  

相关文章:

  • 2022-01-16
  • 2021-12-18
  • 2021-11-29
  • 2021-08-24
  • 2021-12-24
  • 2021-06-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2021-04-10
  • 2021-12-05
相关资源
相似解决方案