KUN1007 / kun-galgame-nuxt3

The CUTEST Visual Novel / Galgame Forum! KUN Visual Novel project. KUN Visual Novel Forum 2nd generation!
https://www.kungal.com
GNU Affero General Public License v3.0
506 stars 32 forks source link

feat: Add ctrl+k to invoke the global search #44

Closed MontagneWang closed 5 months ago

MontagneWang commented 5 months ago

需求 23

Ctrl + K 打开搜索框 Esc 关闭搜索框

KUN1007 commented 5 months ago

非常感谢您的 Pull request 目前的项目,对于所用的一切,例如 UI 组件,以及 composables,我们都打算自己实现一遍。因此,我们不会使用例如 vue-use, lodash 这样的工具库。 由于我们没有在 Readme 或者开发文档写明这一点,给您造成了困惑,我们感到十分抱歉。 因为这一点,对于您的 Pull request,我们将采取拒绝。如果能有幸得到您的再次 Pull request,可以参考

const onKeydown = (event: KeyboardEvent) => {
  ...some actions
}

onMounted(() => window.addEventListener('keydown', onKeydown))

onUnmounted(() => window.removeEventListener('keydown', onKeydown))

该代码位于 /components/edit/topic/Button.vue 我们非常期待您的下一次贡献,为了避免误会,您可以选择加入我们的开发群组 Telegram: https://t.me/KUNForum Tencent QQ: 872839714