-
Notifications
You must be signed in to change notification settings - Fork 0
/
Keyboard.js
35 lines (33 loc) · 847 Bytes
/
Keyboard.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Key from './Key.js'
const template = /*html*/ `
<div class="keyboard">
<div :class="['row', 'row-'+(1+index)]" v-for="(row, index) in keyboardData">
<template v-for="keyContent in row">
<vue-key
:keyContent="keyContent"
:currentLang="currentLang"
:activeKey="activeKey"
:setActiveKey="setActiveKey"
:playActiveKey="playActiveKey"
:shiftOn="shiftOn"
:toggleShiftOn="toggleShiftOn"
/>
</template>
</div>
</div>
`
export default {
template,
props: {
currentLang: String,
keyboardData: Array,
activeKey: Object,
setActiveKey: Function,
playActiveKey: Function,
shiftOn: Boolean,
toggleShiftOn: Function
},
components: {
'vue-key': Key
}
}