ExperiencesList.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div>
  3. List of experiences
  4. <v-data-table
  5. :headers="headers"
  6. :items="desserts"
  7. class="elevation-1"
  8. >
  9. <template v-slot:items="props">
  10. <td>{{ props.item.name }}</td>
  11. <td class="text-xs-right">{{ props.item.calories }}</td>
  12. <td class="text-xs-right">{{ props.item.fat }}</td>
  13. <td class="text-xs-right">{{ props.item.carbs }}</td>
  14. <td class="text-xs-right">{{ props.item.protein }}</td>
  15. <td class="text-xs-right">{{ props.item.iron }}</td>
  16. </template>
  17. </v-data-table>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'ExperiencesList',
  23. components: {},
  24. data() {
  25. return {
  26. headers: [
  27. {
  28. text: 'Experience',
  29. align: 'left',
  30. value: 'name'
  31. },
  32. { text: 'Calories', value: 'calories' },
  33. { text: 'Fat (g)', value: 'fat' },
  34. { text: 'Carbs (g)', value: 'carbs' },
  35. { text: 'Protein (g)', value: 'protein' },
  36. { text: 'Iron (%)', value: 'iron' }
  37. ],
  38. desserts: [
  39. {
  40. name: 'Frozen Yogurt',
  41. calories: 159,
  42. fat: 6.0,
  43. carbs: 24,
  44. protein: 4.0,
  45. iron: '1%'
  46. },
  47. {
  48. name: 'Ice cream sandwich',
  49. calories: 237,
  50. fat: 9.0,
  51. carbs: 37,
  52. protein: 4.3,
  53. iron: '1%'
  54. },
  55. {
  56. name: 'Eclair',
  57. calories: 262,
  58. fat: 16.0,
  59. carbs: 23,
  60. protein: 6.0,
  61. iron: '7%'
  62. },
  63. {
  64. name: 'Cupcake',
  65. calories: 305,
  66. fat: 3.7,
  67. carbs: 67,
  68. protein: 4.3,
  69. iron: '8%'
  70. },
  71. {
  72. name: 'Gingerbread',
  73. calories: 356,
  74. fat: 16.0,
  75. carbs: 49,
  76. protein: 3.9,
  77. iron: '16%'
  78. },
  79. {
  80. name: 'Jelly bean',
  81. calories: 375,
  82. fat: 0.0,
  83. carbs: 94,
  84. protein: 0.0,
  85. iron: '0%'
  86. },
  87. {
  88. name: 'Lollipop',
  89. calories: 392,
  90. fat: 0.2,
  91. carbs: 98,
  92. protein: 0,
  93. iron: '2%'
  94. },
  95. {
  96. name: 'Honeycomb',
  97. calories: 408,
  98. fat: 3.2,
  99. carbs: 87,
  100. protein: 6.5,
  101. iron: '45%'
  102. },
  103. {
  104. name: 'Donut',
  105. calories: 452,
  106. fat: 25.0,
  107. carbs: 51,
  108. protein: 4.9,
  109. iron: '22%'
  110. },
  111. {
  112. name: 'KitKat',
  113. calories: 518,
  114. fat: 26.0,
  115. carbs: 65,
  116. protein: 7,
  117. iron: '6%'
  118. }
  119. ]
  120. }
  121. }
  122. }
  123. </script>