window is not defined
kstan79 opened this issue · comments
Ks Tan commented
Hi, Im trying use this library in nuxt3 but i get below msg:
here is my code
const hotkeys = ref<HotKey[]>([
{
keys: ['shift','enter'],
preventDefault: true,
handler (keys) {
console.log("shortcut",keys)
newData()
}
},
{
keys: ['shift', 'space'],
preventDefault: true,
handler(keys) {
console.log("shortcut",keys)
newData()
}
}
])
console.log(hotkeys.value);
Yugang Cao commented
maybe I need to be compatible with nuxt. I'll to do it