import{d as b,aR as I,r as v,e as U,o as x,x as w,w as r,g as D,aC as F,f as H,y as R,a as t,G as S,bD as j,_ as k,__tla as q}from"./index-8dc1e40a.js";import{b as z,a as C,U as E,H as G,__tla as M}from"./upload-10ffb06f.js";import{u as P,__tla as X}from"./useMessage-7a27dd80.js";import{U as i,__tla as $}from"./useUpload-18ed0543.js";let _,A=Promise.all([(()=>{try{return q}catch{}})(),(()=>{try{return M}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return $}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},_=k(b({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=P(),u=n,d=I("accountId"),o=v([]),c=p,s=U({type:i.Image,title:"",introduction:"",accountId:d}),m=u.type===i.Image?z:C,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"),c("uploaded")},y=a=>e.error("\u4E0A\u4F20\u5931\u8D25: "+a.message);return(a,B)=>{const g=S,h=j;return x(),w(h,{action:t(E),headers:t(G),multiple:"",limit:1,"file-list":t(o),data:t(s),"on-error":y,"before-upload":t(m),"on-success":f},{tip:r(()=>[D("span",l,[F(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[H(g,{type:"primary",plain:""},{default:r(()=>[R(" \u70B9\u51FB\u4E0A\u4F20 ")]),_:1})]),_:3},8,["action","headers","file-list","data","before-upload"])}}}),[["__scopeId","data-v-9db5701b"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/material/components/UploadFile.vue"]])});export{A as __tla,_ as default};
