首页 > 解决方案 > 使用 vuetify 格式化表头中的指数数

问题描述

我想用 html 中的自定义标题替换标题“数字”。我使用 vuetify 来显示数据表。

实际上我有:

                headers: [
                    {text: 'number', value: 'number'},
                    {text: 'car', value: 'car'},
                    {text: 'Total ', value: 'total'},
                    {text: 'Actions', value: 'actions'}
                ],

我想,我必须使用模板和插槽,但我完全迷失了。

标签: javascriptvue.jsvuejs2vuetify.js

解决方案


我找到了解决方案

<template v-slot:header.number>
   Here My custom header
</template>

这很好用!


推荐阅读