You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.6 KiB

  1. <template>
  2. <base-card title="Keyboard Shortcut" :cancel-text="$t('generic.close')" @cancel="close">
  3. <template #content>
  4. <v-simple-table>
  5. <template #default>
  6. <thead>
  7. <tr>
  8. <th class="text-left">Action</th>
  9. <th class="text-left">Key</th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13. <tr v-for="item in items" :key="item.name">
  14. <td>{{ item.name }}</td>
  15. <td>
  16. <v-chip
  17. v-for="key in item.key"
  18. :key="key"
  19. color="grey darken-3 white--text"
  20. class="ma-1"
  21. label
  22. small
  23. >{{ key }}</v-chip
  24. >
  25. </td>
  26. </tr>
  27. </tbody>
  28. </template>
  29. </v-simple-table>
  30. </template>
  31. </base-card>
  32. </template>
  33. <script>
  34. import BaseCard from '@/components/utils/BaseCard'
  35. export default {
  36. components: {
  37. BaseCard
  38. },
  39. data() {
  40. return {
  41. items: [
  42. {
  43. name: 'Jump to the first data',
  44. key: ['shift', '←']
  45. },
  46. {
  47. name: 'Jump to the last data',
  48. key: ['shift', '→']
  49. },
  50. {
  51. name: 'Move to the previous data',
  52. key: ['←']
  53. },
  54. {
  55. name: 'Move to the next data',
  56. key: ['→']
  57. },
  58. {
  59. name: 'Confirm the data',
  60. key: ['enter']
  61. }
  62. ]
  63. }
  64. },
  65. methods: {
  66. close() {
  67. this.$emit('click:close')
  68. }
  69. }
  70. }
  71. </script>