1 |
- import{d as h,aT as I,r as v,g as x,o as U,k as w,w as r,j as z,aH as F,i as H,l as S,a as t,s as j,b8 as k,_ as q,__tla as D}from"./index-66208f93.js";import{b as E,a as P,U as T,H as $,__tla as A}from"./upload-e2f934fc.js";import{u as B,__tla as C}from"./useMessage-798a77de.js";import{U as i,__tla as G}from"./useUpload-7c6f4f89.js";let _,J=Promise.all([(()=>{try{return D}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return C}catch{}})(),(()=>{try{return G}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},_=q(h({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=B(),u=n,c=I("accountId"),o=v([]),d=p,s=x({type:i.Image,title:"",introduction:"",accountId:c}),m=u.type===i.Image?E:P,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 b=j,g=k;return U(),w(g,{action:t(T),headers:t($),multiple:"",limit:1,"file-list":t(o),data:t(s),"on-error":y,"before-upload":t(m),"on-success":f},{tip:r(()=>[z("span",l,[F(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[H(b,{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","D:/zx/mall-newfeifan-zx-business/src/views/mp/material/components/UploadFile.vue"]])});export{J as __tla,_ as default};
|