I want to add class on hovering on button slots but for every room the slots have same id, so document.getElementById is not working as per the requirement. Is there any way i can access slots for every room? I am working on Vue.js enter image description here
<w-col v-for="room in rooms" :id="room.dsid" :key="room.dsid" class="col">
<ImageTitle
:id="room.dsid"
:name="room.space_name+' '+room.building_name"
:src="room.image_url"
@infoClick="showPopOver"
></ImageTitle>
<div v-for="(n,index) in 48" :key="index" class="slot">
<w-button :id="n" raw class="slots" :class="{ 'border-top': index === 0 || index%4 === 0, 'border-bottom': index === 47}" @mouseover.native="mouseOver(n, room.dsid)" @mouseleave.native="mouseLeave()" @click="selectSlot(n, room.name)">
<w-row></w-row>
</w-button>
</div>
</w-col>