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