我正在尝试将perfect-scrollbar添加到Vuetify的数据表中。因此,我需要将数据表包装在perfect-scrollbar组件中,就像这样 -<perfect-scrollbar> <v-data-table :headers="headers" :items="data" /> </perfect-scrollbar> 问题在于它也包裹了数据表格的页脚。我想只在 perfect-scrollbar 组件内包裹表格数据,以便只有数据可滚动,页脚仍然在原地。现在它看起来像这样 -
实际上这里不需要使用perfect-scrollbar。 您只需将高度设置为v-data-table。 然后组件会自动设置滚动条。例如,<v-data-table :headers="headers" :items="data" height="200px"/> 试一下吧。