1 |
- import{d as g,i as v,r as x,x as I,o as U,C as w,A as r,B as z,aO as D,f as F,D as S,a as t,J as C,bh as j,_ as q,__tla as A}from"./index-f6fb8e95.js";import{b as B,a as E,U as H,H as J,__tla as O}from"./upload-d5540936.js";import{u as P,__tla as $}from"./useMessage-3b767a67.js";import{U as i,__tla as k}from"./useUpload-cca2c9d7.js";let _,G=Promise.all([(()=>{try{return A}catch{}})(),(()=>{try{return O}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return k}catch{}})()]).then(async()=>{let l;l={class:"el-upload__tip",style:{"margin-left":"5px"}},_=q(g({__name:"UploadFile",props:{type:{type:String,required:!0}},emits:["uploaded"],setup(n,{emit:p}){const e=P(),d=n,c=v("accountId"),o=x([]),u=p,s=I({type:i.Image,title:"",introduction:"",accountId:c}),m=d.type===i.Image?B:E,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"),u("uploaded")},y=a=>e.error("\u4E0A\u4F20\u5931\u8D25: "+a.message);return(a,K)=>{const h=C,b=j;return U(),w(b,{action:t(H),headers:t(J),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,[D(a.$slots,"default",{},void 0,!0)])]),default:r(()=>[F(h,{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-admin/src/views/mp/material/components/UploadFile.vue"]])});export{G as __tla,_ as default};
|