System.register(["./vendor-legacy-2701520b.js","./qiNiu.config-legacy-92df1e03.js","./index-legacy-2b663974.js"],(function(e,t){"use strict";var a,l,i,n,o,s,r,u=document.createElement("style");return u.textContent="[data-v-1506131b] .el-upload--picture-card{background-color:#f6f8fc}.lj-upload-images[data-v-1506131b] .el-upload-list .el-upload-list__item>div{width:100%;height:100%}.tip[data-v-1506131b]{color:#1651ee;font-size:12px;line-height:27px;width:400px}[data-v-1506131b] .el-upload--picture-card{background-color:#fff;border:1px dashed #E6E6E6;border-radius:6px;-webkit-box-sizing:border-box;box-sizing:border-box;width:140px;height:85px;cursor:pointer;line-height:140px;vertical-align:top}[data-v-1506131b] .el-upload-list__item,[data-v-1506131b] .el-upload-list__item-actions,[data-v-1506131b] .el-upload-list__item-thumbnail,[data-v-1506131b] .is-success{width:140px;height:85px}\n",document.head.appendChild(u),{setters:[function(e){a=e.r,l=e.w,i=e.v,n=e.e},function(e){o=e.q},function(e){s=e.n,r=e.g}],execute:function(){var t={__name:"LJUploadImages",props:{value:{type:String,default:null},accept:{type:String,default:".jpg,.jpeg,.png,.gif,.bmp,.pdf,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"},autoUpload:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},limit:{type:Number,default:10}},emits:["input"],setup:function(e,t){var s=t.expose,u=t.emit,d=e,c=a(),p=a(""),f=a(!1),m=a(!1),g=a(o.uploadFileField),v=a(b(d.value));function h(e){return e.filter((function(e){return"success"===e.status})).map((function(e){return e.urls})).join(",")}function b(e){function t(e){return{name:e,url:e,urls:e,uid:i()}}return e?e.indexOf(",")>-1?e.split(",").map((function(e){return t(e)})):[t(e)]:[]}function _(){c.value.clearFiles()}return l((function(){return v.value}),(function(e){u("input",h(e))}),{deep:!0}),s({clearFiles:_}),{__sfc:!0,uploadUrl:"http://sms.9haoai.com/api/upload_qiniu/",emits:u,props:d,LJUploadImagesRef:c,dialogImageUrl:p,dialogVisible:f,disabled:m,uploadFileNameField:g,modelFiles:v,formatValueStr:h,formatValueArray:b,handleRemove:function(e){var t=v.value.findIndex((function(t){return t.uid===e.uid}));v.value.splice(t,1)},handlePictureCardPreview:function(e){p.value=e.url,f.value=!0},handleDownload:function(e){var t,a,l;t=e.url,a=e.name,(l=document.createElement("a")).download=a,l.href=t,l.click(),l.remove()},handleUploadSuccess:function(e,t,a){v.value=a,v.value.filter((function(e){return"success"===e.status&&!e.urls})).map((function(e){e.urls=e.response.data}))},handleError:function(){n.exports.Message({type:"error",message:"上传失败",offset:"20px"})},handleExceed:function(e){n.exports.Message.warning("当前限制选择 ".concat(d.limit," 个文件，本次选择了 ").concat(e.length," 个文件"))},clearFiles:_,setHeaders:function(){return{Authorization:"token "+r("token")}}}}};e("L",s(t,(function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"lj-upload-images"},[t("el-upload",{ref:"LJUploadImagesRef",attrs:{"list-type":"picture-card",accept:e.accept,headers:a.setHeaders(),name:a.uploadFileNameField,"file-list":a.modelFiles,action:a.uploadUrl,"auto-upload":e.autoUpload,"on-success":a.handleUploadSuccess,"on-error":a.handleError,"on-exceed":a.handleExceed,multiple:e.multiple,limit:e.limit},scopedSlots:e._u([{key:"file",fn:function(l){var i=l.file;return t("div",{},[t("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:i.url,alt:""}}),t("span",{staticClass:"el-upload-list__item-actions"},[t("span",{staticClass:"el-upload-list__item-preview",on:{click:function(e){return a.handlePictureCardPreview(i)}}},[t("i",{staticClass:"el-icon-zoom-in"})]),a.disabled?e._e():t("span",{staticClass:"el-upload-list__item-delete",on:{click:function(e){return a.handleDownload(i)}}},[t("i",{staticClass:"el-icon-download"})]),a.disabled?e._e():t("span",{staticClass:"el-upload-list__item-delete",on:{click:function(e){return a.handleRemove(i)}}},[t("i",{staticClass:"el-icon-delete"})])])])}}])},[t("div",{staticClass:"tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 选择"+e._s("."!==e.accept?e.accept:"")+"文件 ")]),t("div",{staticClass:"uploadFile"},[t("img",{staticStyle:{transform:"translateY(-30%)","margin-top":"32px"},attrs:{src:"/svg/upload-img-icon-b49be46a.svg"}})])]),t("el-dialog",{attrs:{visible:a.dialogVisible,top:"20px"},on:{"update:visible":function(e){a.dialogVisible=e}}},[t("img",{attrs:{width:"100%",src:a.dialogImageUrl,alt:""}})])],1)}),[],!1,null,"1506131b",null,null).exports)}}}));
