UploadFile-cd27dd4c.js 1.5 KB

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