import{d as g,bP as v,r as x,f as I,o as U,x as w,w as s,h as z,aG as D,g as F,n as S,a as t,D as q,bb as P,_ as j,__tla as E}from"./index-3fb48822.js";import{b as G,a as H,U as $,H as k,__tla as A}from"./upload-c75843dd.js";import{u as B,__tla as C}from"./useMessage-b6c78c26.js";import{U as i,__tla as J}from"./useUpload-fb2639ce.js";let _,K=Promise.all([(()=>{try{return E}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"}},_=j(g({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=B(),d=n,c=v("accountId"),o=x([]),u=p,r=I({type:i.Image,title:"",introduction:"",accountId:c}),m=d.type===i.Image?G:H,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"),u("uploaded")},y=a=>e.error("\u4E0A\u4F20\u5931\u8D25: "+a.message);return(a,L)=>{const b=q,h=P;return U(),w(h,{action:t($),headers:t(k),multiple:"",limit:1,"file-list":t(o),data:t(r),"on-error":y,"before-upload":t(m),"on-success":f},{tip:s(()=>[z("span",l,[D(a.$slots,"default",{},void 0,!0)])]),default:s(()=>[F(b,{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","D:/zx/mall-newfeifan-zx-admin/src/views/mp/material/components/UploadFile.vue"]])});export{K as __tla,_ as default};