Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/keyboard shortcuts #2

Merged
merged 2 commits into from
Dec 2, 2022

Conversation

declanchiu
Copy link
Contributor

根据作者 readme 的描述想法 , 我大致拆分了原 github1s.tsx 的组件内部结构:

  • event: 用于存放可能涉及到 content 页面里的一些逻辑方法

  • views:注入当前 url 页面的组件。

  • hooks:用于对应各自 views 的逻辑抽离。

  • register: 注册一些初始化 views 的方法。

后续增加不同页面的 组件的时候可以在views 里面新建,然后使用以上的不同层的逻辑。

@declanchiu
Copy link
Contributor Author

feat in #1

@declanchiu
Copy link
Contributor Author

补充说明:没有使用谷歌插件自带的快捷键 command 是因为,它需要组合才能使用, 这个完全不符合直接单个按键的需求, 所以这里直接使用了基于 在线编辑按钮的 bom 环境, 直接采用了 keyCode, 不过不是 event.keyCode, 因为这个已经废弃了。采用的是 keydown 的 Event.code 的判断完成。

@wangrongding wangrongding merged commit 3885129 into fedtop:main Dec 2, 2022
@declanchiu declanchiu deleted the feature/keyboard-shortcuts branch December 4, 2022 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants