import{t as d}from"./debounce-Xd493GvO.js";import{r as f}from"./request-CEvu378m.js";import{d as _}from"./index-M_JNBppB.js";import{ax as w,r as g,c as m,w as u,j as V,X as j,ag as x,y as K,z as k,u as b}from"./vue-BJk78QHK.js";import"./element-3_pOinej.js";import"./utils-YI6ye1sf.js";import"./threejs-BafxXW5-.js";import"./vxe-Dx3zSILm.js";const L=Object.assign({name:"ScrollTable"},{__name:"ScrollTable",props:{propValue:{type:Object,default:()=>({})},request:{type:Object,default:()=>({})},element:{type:Object,default:()=>({})}},setup(h){const e=h,l=w(),o=g(null),c=g(0),y=m(()=>{const t=_(e.propValue.config);return(e.propValue.config.showHeader||e.propValue.config.showHeader===void 0)&&(t.header=t.data[0]),t.data.splice(0,1),t}),v=m(()=>{const t=e.element.style.width,a=e.element.style.height;return{width:t,height:a}});u(v,d(()=>{c.value++},500),{deep:!0}),u(()=>e.propValue,d(()=>{},500),{deep:!0}),V(()=>{var t,a;e.request&&(o.value=f(e.request,e.element.propValue.config,"data","")),((a=(t=e.request)==null?void 0:t.global)==null?void 0:a.length)>0&&u(()=>l.state.globalKey,()=>{e.request.global.forEach(n=>{const s=l.state.globalKey.findIndex(r=>r.globalKey===n);if(s>-1){const r=[l.state.globalKey[s].globalKey,l.state.globalKey[s].globalValue],p=e.request.data.findIndex(q=>q[0]===r[0]);p>-1?e.request.data[p][1]=r[1]:e.request.data.push(r)}}),o.value&&o.value(),o.value=f(e.request,e.element.propValue.config,"data","")},{deep:!0}),window.addEventListener("resize",i)}),j(()=>{e.request&&o.value&&o.value(),window.removeEventListener("resize",i)});function i(){}return(t,a)=>{const n=x("dv-scroll-board");return k(),K(n,{key:b(c),config:b(y),style:{width:"100%",height:"100%","background-color":"rgba(214, 11, 11, 0)"}},null,8,["config"])}}});export{L as default};
