I'm trying to parse some excel sheets for my web project and in this q-table I need to set two columns with vertical text just like this example but when I try to rotate it changes all columns.
{
name: 'first',
align: 'center',
label: 'First col header',
field: row => row.value
},
{
name: 'second',
align: 'center',
label: 'Second col header',
field: row => row.value
},
{
name: 'third',
align: 'center',
label: 'Third col header',
field: row => row.value
},
{
name: 'fourth',
align: 'center',
label: 'Fourth col header',
field: row => row.value
},
]
.text-vertical
to headers that need to be vertical.
Like this: <q-table
:rows="rows"
:columns="columns"
row-key="name"
>
<template v-slot:header-cell-second="props">
<q-th :props="props">
<span class="text-vertical">
{{ props.col.label }}
</span>
</q-th>
</template>
<template v-slot:header-cell-third="props">
<q-th :props="props">
<span class="text-vertical">
{{ props.col.label }}
</span>
</q-th>
</template>
</q-table>
.text-vertical{
writing-mode: vertical-rl;
transform: rotate(-180deg)
}