import{d as g,aU as I,r as v,f as x,o as U,x as w,w as r,h as q,aG as z,g as D,q as F,a as t,D as S,ba as j,_ as E,__tla as G}from"./index-7d5b26d3.js";import{b as H,a as P,U as $,H as k,__tla as A}from"./upload-97f0eef8.js";import{u as B,__tla as C}from"./useMessage-c81eaa5b.js";import{U as i,__tla as J}from"./useUpload-8fce1b59.js";let _,K=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return C}catch{}})(),(()=>{try{return J}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},_=E(g({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=B(),u=n,c=I("accountId"),o=v([]),d=p,s=x({type:i.Image,title:"",introduction:"",accountId:c}),m=u.type===i.Image?H:P,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,L)=>{const h=S,b=j;return U(),w(b,{action:t($),headers:t(k),multiple:"",limit:1,"file-list":t(o),data:t(s),"on-error":y,"before-upload":t(m),"on-success":f},{tip:r(()=>[q("span",l,[z(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[D(h,{type:"primary",plain:""},{default:r(()=>[F(" \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{K as __tla,_ as default};
