import{_,r as d,am as m,e as g,D as v,F as b,h as n,o as h,l as x,w as k,an as y}from"./index.82404a61.js";/* empty css */const B={__name:"upload",props:{action:{type:String,default:"/prod-api/system/upload"},data:{type:Object,default:()=>{}},disabled:{type:Boolean,default:!1}},emits:["success"],setup(r,{emit:c}){const t=r,u=d({Authorization:"Bearer "+m()}),a=d(!1),i=e=>(console.log(e),a.value=!0,!0),p=(e,s,o)=>{a.value=!1;const l=e.data;c("success",l)},f=(e,s,o)=>{console.log(e,s,o),a.value=!1};return(e,s)=>{const o=g("el-upload"),l=v("loading");return b((h(),x(o,{"element-loading-text":"\u52A0\u8F7D\u4E2D...","element-loading-background":"rgba(0, 0, 0, 0.6)",class:"upload",accept:".xls, .xlsx",action:t.action,data:t.data,headers:n(u),"before-upload":i,"on-success":p,"on-error":f,disabled:t.disabled},{default:k(()=>[y(e.$slots,"default",{},void 0,!0)]),_:3},8,["action","data","headers","disabled"])),[[l,n(a),void 0,{fullscreen:!0,lock:!0}]])}}},F=_(B,[["__scopeId","data-v-41c45d28"]]);export{F as default};