1 |
- import{d as b,aP as v,r as I,e as U,o as w,v as x,w as r,g as D,aD as F,f as H,n as S,a as t,C as j,bl as k,_ as P,__tla as q}from"./index-11e4820e.js";import{b as z,a as C,U as E,H as R,__tla as X}from"./upload-5e107e30.js";import{u as $,__tla as A}from"./useMessage-06ddf735.js";import{U as i,__tla as B}from"./useUpload-7eca9e2f.js";let n,G=Promise.all([(()=>{try{return q}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return B}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},n=P(b({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(_,{emit:p}){const e=$(),u=_,d=v("accountId"),o=I([]),c=p,s=U({type:i.Image,title:"",introduction:"",accountId:d}),m=u.type===i.Image?z:C,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"),c("uploaded")},y=a=>e.error("\u4E0A\u4F20\u5931\u8D25: "+a.message);return(a,J)=>{const g=j,h=k;return w(),x(h,{action:t(E),headers:t(R),multiple:"",limit:1,"file-list":t(o),data:t(s),"on-error":y,"before-upload":t(m),"on-success":f},{tip:r(()=>[D("span",l,[F(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[H(g,{type:"primary",plain:""},{default:r(()=>[S(" \u70B9\u51FB\u4E0A\u4F20 ")]),_:1})]),_:3},8,["action","headers","file-list","data","before-upload"])}}}),[["__scopeId","data-v-9db5701b"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/material/components/UploadFile.vue"]])});export{G as __tla,n as default};
|