From e87e5264a5a90bdde2037e6587442c03420ca357 Mon Sep 17 00:00:00 2001 From: Kubbo <390378816@qq.com> Date: Wed, 28 Aug 2024 00:45:32 +0800 Subject: [PATCH] BUG 20240827 2 --- src/views/AppStoresTable.vue | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/views/AppStoresTable.vue b/src/views/AppStoresTable.vue index c26da9e..f446efc 100644 --- a/src/views/AppStoresTable.vue +++ b/src/views/AppStoresTable.vue @@ -151,16 +151,27 @@ export default { } }) }, + handleHotKey(e) { + if (e.code == "ArrowLeft") { + this.$refs.carousel.prev() + } else if (e.code == "ArrowRight") { + this.$refs.carousel.next() + } + } }, mounted() { this.height = `${this.$el.clientHeight - 30}px` + document.onkeyup = this.handleHotKey + }, + beforeDestroy() { + document.onkeyup = null } }