System.register(["./vendor-legacy-2701520b.js","./qiNiu.config-legacy-92df1e03.js","./index-legacy-2b663974.js"],(function(e,t){"use strict";var l,n,i,a,o,u,s,r=document.createElement("style");return r.textContent=".uploadFile[data-v-f6872968]{background-color:#fff;border:1px solid #4671FF;border-radius:6px;-webkit-box-sizing:border-box;box-sizing:border-box;width:120px;height:35px;cursor:pointer;line-height:33px;vertical-align:top;color:#4671ff;font-size:14px}.el-upload__tip[data-v-f6872968]{color:#1651ee;font-size:12px;line-height:20px}\n",document.head.appendChild(r),{setters:[function(e){l=e.r,n=e.w,i=e.v,a=e.e},function(e){o=e.q},function(e){u=e.n,s=e.g}],execute:function(){var t={__name:"LJUploadFiles",props:{value:{type:String,default:null},accept:{type:String,default:"."},autoUpload:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},limit:{type:Number,default:10}},emits:["input"],setup:function(e,t){var u=t.emit,r=e,c=l(o.uploadFileField),d=l(),p=l(m(r.value));function f(e){return e.filter((function(e){return"success"===e.status})).map((function(e){return e.urls})).join(",")}function m(e){function t(e){return{name:e,url:e,urls:e,status:"success",uid:i()}}return e?e.indexOf(",")>-1?e.split(",").map((function(e){return t(e)})):[t(e)]:[]}return n((function(){return p.value}),(function(e){u("input",f(e))}),{deep:!0}),{__sfc:!0,props:r,uploadUrl:"http://sms.9haoai.com/api/upload_qiniu/",uploadFileNameField:c,emits:u,LJUploadFilesRef:d,modelFiles:p,formatValueStr:f,formatValueArray:m,handleUploadSuccess:function(e,t,l){p.value=l,p.value.filter((function(e){return"success"===e.status&&!e.urls})).map((function(e){e.urls=e.response.data}))},handleRemove:function(e,t){p.value=t},handlePreview:function(e){console.log("handlePreview:",{file:e})},setHeaders:function(){return{Authorization:"token "+s("token")}},handleExceed:function(e,t){a.exports.Message.warning("当前限制选择 ".concat(r.limit," 个文件，本次选择了 ").concat(t.length," 个文件"))}}}};e("L",u(t,(function(){var e=this,t=e._self._c,l=e._self._setupProxy;return t("div",{staticClass:"lj-upload-files"},[t("el-upload",{ref:"LJUploadFilesRef",attrs:{action:l.uploadUrl,accept:e.accept,headers:l.setHeaders(),"auto-upload":e.autoUpload,name:l.uploadFileNameField,"file-list":l.modelFiles,"on-success":l.handleUploadSuccess,"on-remove":l.handleRemove,"on-preview":l.handlePreview,"on-exceed":l.handleExceed,multiple:e.multiple,limit:e.limit}},[t("div",{staticClass:"uploadFile"},[t("i",{staticClass:"el-icon-upload2",staticStyle:{"margin-right":"10px"}}),e._v("上传文件 ")]),t("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 选择"+e._s("."!==e.accept?e.accept:"")+"文件 ")])])],1)}),[],!1,null,"f6872968",null,null).exports)}}}));
