From bd0205ff46d7ef68545fdf02eb6e6b3589f2fcb9 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Mon, 20 Nov 2023 19:55:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=AE=8C=E5=96=84=E5=90=84?= =?UTF-8?q?=E4=B8=AAui=E7=9A=84=E6=8C=89=E9=94=AE=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/colomn.vue | 17 +--------- src/core/main/custom/hotkey.ts | 7 ++-- src/core/main/init/hotkey.ts | 60 ++++++++++++++++++++++++++++++++++ src/ui/desc.vue | 14 +++++++- src/ui/equipbox.vue | 29 ++++++++-------- src/ui/fly.vue | 3 ++ src/ui/shop.vue | 8 ++--- src/ui/skillTree.vue | 24 ++++++++------ src/ui/toolbox.vue | 3 ++ 9 files changed, 117 insertions(+), 48 deletions(-) diff --git a/src/components/colomn.vue b/src/components/colomn.vue index 4951586..cf44493 100644 --- a/src/components/colomn.vue +++ b/src/components/colomn.vue @@ -27,9 +27,7 @@ import { onMounted, onUnmounted, onUpdated, ref } from 'vue'; import { LeftOutlined } from '@ant-design/icons-vue'; import Scroll from './scroll.vue'; import { isMobile } from '../plugin/use'; -import { has, keycode } from '../plugin/utils'; -import { sleep } from 'mutate-animate'; -import { KeyCode } from '../plugin/keyCodes'; +import { has } from '../plugin/utils'; const emits = defineEmits<{ (e: 'close'): void; @@ -59,23 +57,10 @@ function resize() { if (has(props.right)) right.style.flexBasis = `${props.right}%`; } -// function key(e: KeyboardEvent) { -// const c = keycode(e.keyCode); -// if (c === KeyCode.Escape || c === KeyCode.KeyX) emits('close'); -// } - onMounted(async () => { resize(); - - await sleep(50); - // if (mota.plugin.ui.transition.value) await sleep(600); - // document.addEventListener('keyup', key); }); onUpdated(resize); - -onUnmounted(() => { - // document.removeEventListener('keyup', key); -});