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