开发反馈弹窗

This commit is contained in:
zyronon
2023-08-23 16:44:49 +08:00
parent 093c84964a
commit 0291476e4c
13 changed files with 450 additions and 275 deletions

12
src/hooks/useEsc.ts Normal file
View File

@@ -0,0 +1,12 @@
import {onMounted} from "vue"
export function useEsc(can: boolean) {
onMounted(() => {
window.addEventListener('keyup', (e: KeyboardEvent) => {
if (e.key === 'Escape' && can) {
close()
}
})
})
return [useEsc()]
}