import{d as h,aP as v,r as I,e as U,o as x,v as w,w as r,g as z,aD as D,f as F,n as P,a as t,C as S,bl as j,_ as q,__tla as C}from"./index-04f8d540.js";import{b as E,a as H,U as M,H as $,__tla as k}from"./upload-6bba24a1.js";import{u as A,__tla as B}from"./useMessage-9c37e840.js";import{U as i,__tla as G}from"./useUpload-6abbaacb.js";let _,J=Promise.all([(()=>{try{return C}catch{}})(),(()=>{try{return k}catch{}})(),(()=>{try{return B}catch{}})(),(()=>{try{return G}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},_=q(h({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=A(),u=n,c=v("accountId"),o=I([]),d=p,s=U({type:i.Image,title:"",introduction:"",accountId:c}),m=u.type===i.Image?E:H,f=a=>{if(a.code!==0)return e.alertError("\u4E0A\u4F20\u51FA\u9519\uFF1A"+a.msg),!1;o.value=[],s.title="",s.introduction="",e.notifySuccess("\u4E0A\u4F20\u6210\u529F"),d("uploaded")},y=a=>e.error("\u4E0A\u4F20\u5931\u8D25: "+a.message);return(a,K)=>{const b=S,g=j;return x(),w(g,{action:t(M),headers:t($),multiple:"",limit:1,"file-list":t(o),data:t(s),"on-error":y,"before-upload":t(m),"on-success":f},{tip:r(()=>[z("span",l,[D(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[F(b,{type:"primary",plain:""},{default:r(()=>[P(" \u70B9\u51FB\u4E0A\u4F20 ")]),_:1})]),_:3},8,["action","headers","file-list","data","before-upload"])}}}),[["__scopeId","data-v-9db5701b"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mp/material/components/UploadFile.vue"]])});export{J as __tla,_ as default};
