|
|
|
|
@ -1,7 +1,23 @@
|
|
|
|
|
<script setup>
|
|
|
|
|
import { onMounted, getCurrentInstance } from 'vue'
|
|
|
|
|
const currentWorkingCategory = defineModel('currentWorkingCategory')
|
|
|
|
|
const currentWorkingInstrument = defineModel('currentWorkingInstrument')
|
|
|
|
|
const props = defineProps(['categories', 'instruments'])
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
onMounted(()=>{
|
|
|
|
|
let started = false
|
|
|
|
|
window.addEventListener('keydown', (event)=>{
|
|
|
|
|
event.preventDefault()
|
|
|
|
|
if(event.key === 'ArrowDown' && !started){
|
|
|
|
|
proxy.start()
|
|
|
|
|
started = true
|
|
|
|
|
} else if (event.key === 'ArrowUp' && started){
|
|
|
|
|
proxy.stop()
|
|
|
|
|
started = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|