1 |
- import{d as b,aQ as v,r as I,e as U,o as x,v as w,w as s,g as z,aE as E,f as F,n as S,a as t,C as q,bl as j,_ as C,__tla as D}from"./index-e3afde76.js";import{b as H,a as P,U as Q,H as $,__tla as k}from"./upload-39d99fa3.js";import{u as A,__tla as B}from"./useMessage-0b1b25bd.js";import{U as i,__tla as G}from"./useUpload-862b2d2b.js";let _,J=Promise.all([(()=>{try{return D}catch{}})(),(()=>{try{return k}catch{}})(),(()=>{try{return B}catch{}})(),(()=>{try{return G}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},_=C(b({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=A(),d=n,c=v("accountId"),o=I([]),u=p,r=U({type:i.Image,title:"",introduction:"",accountId:c}),m=d.type===i.Image?H:P,f=a=>{if(a.code!==0)return e.alertError("\u4E0A\u4F20\u51FA\u9519\uFF1A"+a.msg),!1;o.value=[],r.title="",r.introduction="",e.notifySuccess("\u4E0A\u4F20\u6210\u529F"),u("uploaded")},y=a=>e.error("\u4E0A\u4F20\u5931\u8D25: "+a.message);return(a,K)=>{const g=q,h=j;return x(),w(h,{action:t(Q),headers:t($),multiple:"",limit:1,"file-list":t(o),data:t(r),"on-error":y,"before-upload":t(m),"on-success":f},{tip:s(()=>[z("span",l,[E(a.$slots,"default",{},void 0,!0)])]),default:s(()=>[F(g,{type:"primary",plain:""},{default:s(()=>[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-admin/src/views/mp/material/components/UploadFile.vue"]])});export{J as __tla,_ as default};
|