const i={created(){window.addEventListener("scroll",this.handleScroll)},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll)},methods:{handleScroll(){if(this.$refs.table){document.querySelectorAll(".index-table .index-table-head").forEach((e,l)=>{e.childNodes.forEach(s=>{s.style&&(s.style.zIndex=(l+1)*10)})});let t;if(document.querySelectorAll(".index-table .index-table-head").forEach(e=>{this.checkIfScrolledOff(e)&&(t=e)}),t===void 0||this.$refs.table.getBoundingClientRect().bottom<0)this.$refs.sticky.classList.add("hidden"),this.$refs.sticky.classList.remove("flex");else{let e=t.childNodes;this.$refs.sticky.innerHTML=t.innerHTML,this.$refs.sticky.childNodes.forEach((l,s)=>{l.style.width=`${e[s].clientWidth+1.5}px`}),this.$refs.sticky.style.zIndex=parseInt(e[0].style.zIndex)+1,this.$refs.sticky.classList.add("flex"),this.$refs.sticky.classList.remove("hidden")}}},checkIfScrolledOff(t){return t.getBoundingClientRect().top<0}}};export{i as s};