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