如何在 Vuetify 3 中自定义 Group 列标题?

问题描述 投票:0回答:1

在 Vuetify 3 中使用

VDataTable
时,当您使用
group-by
属性时,名为 Group 的列将添加为表格的第一列。有什么办法可以改变它的名称和定位吗?目前文档对此尚不清楚。

vuetify.js
1个回答
0
投票

我认为你可以通过使用插槽来实现这一点

group.header
:

https://vuetifyjs.com/en/api/v-data-table/#slots-group-header

<template v-slot:[`group.header`]="{}">
  <th>
    xxx
  </th>
  
</template>
© www.soinside.com 2019 - 2024. All rights reserved.