Suppose we have a data variable and I want to utilize this data variable for styling purposes.
data()
{
return{
selected:{
index: 2
}
}
}
<style>
.parent-table >>> .table-row:nth-child(/* here I intend to use selected.index */) {
background: red;
}
</style>
My scenario involves using a table component on my landing page. The goal is to modify the background of the selected row in the table from the landing page.