UploadFile-e616da26.js 1.5 KB

1
  1. import{d as b,i as I,r as v,x,o as U,C as A,A as r,B,aN as C,f as D,D as E,a as t,J as F,bg as j,__tla as H}from"./index-a9d538d5.js";import{b as J,a as N,U as P,H as S,__tla as $}from"./upload-64af7517.js";import{u as k,__tla as q}from"./useMessage-d5cbbfad.js";import{U as i,__tla as w}from"./useUpload-e4ed9474.js";import{_ as z}from"./_plugin-vue_export-helper-1b428a4d.js";let _,G=Promise.all([(()=>{try{return H}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return q}catch{}})(),(()=>{try{return w}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},_=z(b({__name:"UploadFile",props:{type:{}},emits:["uploaded"],setup(c,{emit:p}){const e=k(),n=c,u=I("accountId"),o=v([]),d=p,s=x({type:i.Image,title:"",introduction:"",accountId:u}),m=n.type===i.Image?J:N,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 h=F,g=j;return U(),A(g,{action:t(P),headers:t(S),multiple:"",limit:1,"file-list":t(o),data:t(s),"on-error":y,"before-upload":t(m),"on-success":f},{tip:r(()=>[B("span",l,[C(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[D(h,{type:"primary",plain:""},{default:r(()=>[E(" \u70B9\u51FB\u4E0A\u4F20 ")]),_:1})]),_:3},8,["action","headers","file-list","data","before-upload"])}}}),[["__scopeId","data-v-c21a7348"]])});export{G as __tla,_ as default};