|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<script setup>
|
|
|
|
|
import { defineProps } from 'vue';
|
|
|
|
|
import { onMounted, defineProps, ref } from 'vue';
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
currentWorkingCategory,
|
|
|
|
|
@ -12,9 +12,21 @@
|
|
|
|
|
currentWorkingCategory.value = categories.value.find(category => category.instrument === currentWorkingInstrument.value.name)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const categoryInput = ref(null)
|
|
|
|
|
|
|
|
|
|
onMounted(()=>{
|
|
|
|
|
window.addEventListener('keydown', (event)=>{
|
|
|
|
|
if(event.ctrlKey === true){
|
|
|
|
|
if(event.key === 'c') {
|
|
|
|
|
categoryInput.value.focus();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<select @change="selectFirstInstrumentOfCategory" v-model="currentWorkingInstrument">
|
|
|
|
|
<select ref="categoryInput" @change="selectFirstInstrumentOfCategory" v-model="currentWorkingInstrument">
|
|
|
|
|
<option :value="instrument" v-for="instrument in instruments">
|
|
|
|
|
{{instrument.name}}
|
|
|
|
|
</option>
|
|
|
|
|
|