(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22e146"],{f9da:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-upload",{attrs:{action:e.action,"list-type":"picture-card","http-request":e.httpRequest,limit:e.limit,"file-list":e.fileList,"on-exceed":e.exceed,"on-success":e.success,headers:{token:e.token},multiple:e.multiple,"on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove}},[i("i",{staticClass:"el-icon-plus"})]),i("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1)},l=[],s=(i("3a20"),i("b54b")),o=i("5880"),a={name:"elx-upload",props:{limit:null,multiple:{type:Boolean,default:!0},fileList:{type:Array,default:[]},value:[Array,String]},data:function(){var e=this.$service.common.upload();return{action:e.url,list:[],index:0,dialogImageUrl:"",dialogVisible:!1}},computed:Object(s["a"])({},Object(o["mapGetters"])(["token"])),mounted:function(){this.init()},methods:{init:function(){},httpRequest:function(e){var t=this,i=e.file;this.getBase64(i).then((function(i){t.$service.common.uploadImg({content:i}).then((function(t){e.onSuccess(t)}))}))},handleRemove:function(e,t){this.$emit("handleRemove",{file:e,fileList:t})},handlePictureCardPreview:function(e){this.dialogImageUrl=e.showBBGG||e.url,this.dialogVisible=!0},exceed:function(){this.$message("不能超过".concat(this.limit))},success:function(e,t,i){this.$emit("update:fileList",i),this.$emit("success",{response:e,file:t,fileList:i})},getBase64:function(e){return new Promise((function(t,i){var n=new FileReader,l="";n.readAsDataURL(e),n.onload=function(){l=n.result},n.onerror=function(e){i(e)},n.onloadend=function(){t(l)}}))}}},c=a,u=i("623f"),r=Object(u["a"])(c,n,l,!1,null,"4c462b97",null);t["default"]=r.exports}}]);