1 |
- import{d as g,bN as v,r as x,f as I,o as U,x as w,w as r,h as D,aD as q,g as z,q as F,a as t,D as S,b8 as j,_ as E,__tla as H}from"./index-f90b5c34.js";import{b as N,a as P,U as $,H as k,__tla as A}from"./upload-b6511147.js";import{u as B,__tla as C}from"./useMessage-b63be42a.js";import{U as i,__tla as G}from"./useUpload-54d4edfc.js";let _,J=Promise.all([(()=>{try{return H}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"}},_=E(g({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=B(),u=n,c=v("accountId"),o=x([]),d=p,s=I({type:i.Image,title:"",introduction:"",accountId:c}),m=u.type===i.Image?N: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=S,h=j;return U(),w(h,{action:t($),headers:t(k),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,[q(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[z(b,{type:"primary",plain:""},{default:r(()=>[F(" \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};
|