mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-07 16:36:57 +08:00
🐛 Fix: shift key function in gallery page
This commit is contained in:
@@ -178,8 +178,12 @@ export default class extends Vue {
|
|||||||
document.addEventListener('keyup', this.handleDetectShiftKey)
|
document.addEventListener('keyup', this.handleDetectShiftKey)
|
||||||
}
|
}
|
||||||
handleDetectShiftKey (event: KeyboardEvent) {
|
handleDetectShiftKey (event: KeyboardEvent) {
|
||||||
if (event.keyCode === 16) {
|
if (event.key === 'Shift') {
|
||||||
this.isShiftKeyPress = !this.isShiftKeyPress
|
if (event.type === 'keydown') {
|
||||||
|
this.isShiftKeyPress = true
|
||||||
|
} else if (event.type === 'keyup') {
|
||||||
|
this.isShiftKeyPress = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get filterList () {
|
get filterList () {
|
||||||
|
|||||||
Reference in New Issue
Block a user