/
githubmirror
/
vuetify
Обзор
Документация
Войти
/
githubmirror
/
vuetify
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/docs/src/examples/v-table/prop-fixed-header.vue
122 строки
2 KB
John Leider
chore: add vue/attributes-order eslint rule
29 фев 2024, 07:06
29 фев 2024, 07:06
65aff8f
Код
Авторство
О чём код?
<template> <v-table height="300px" fixed-header > <thead> <tr> <th class="text-left"> Name </th> <th class="text-left"> Calories </th> </tr> </thead> <tbody> <tr v-for="item in desserts" :key="item.name" > <td>{{ item.name }}</td> <td>{{ item.calories }}</td> </tr> </tbody> </v-table> </template> <script setup> const desserts = [ { name: 'Frozen Yogurt', calories: 159, }, { name: 'Ice cream sandwich', calories: 237, }, { name: 'Eclair', calories: 262, }, { name: 'Cupcake', calories: 305, }, { name: 'Gingerbread', calories: 356, }, { name: 'Jelly bean', calories: 375, }, { name: 'Lollipop', calories: 392, }, { name: 'Honeycomb', calories: 408, }, { name: 'Donut', calories: 452, }, { name: 'KitKat', calories: 518, }, ] </script> <script> export default { data () { return { desserts: [ { name: 'Frozen Yogurt', calories: 159, }, { name: 'Ice cream sandwich', calories: 237, }, { name: 'Eclair', calories: 262, }, { name: 'Cupcake', calories: 305, }, { name: 'Gingerbread', calories: 356, }, { name: 'Jelly bean', calories: 375, }, { name: 'Lollipop', calories: 392, }, { name: 'Honeycomb', calories: 408, }, { name: 'Donut', calories: 452, }, { name: 'KitKat', calories: 518, }, ], } }, } </script>