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

fix: permit keyboard login #23

Merged
merged 4 commits into from
Jul 27, 2022
Merged

fix: permit keyboard login #23

merged 4 commits into from
Jul 27, 2022

Conversation

123daxian
Copy link
Collaborator

close #12

@123daxian
Copy link
Collaborator Author

20220727_161143.mp4

这个是效果,登录的时候都是用回车键登录的

Copy link
Member

@charlie0129 charlie0129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不错,能达成目的,足够了。

题外话:有点 hacky 就是了😂,其实不用去获取 keycode 的,直接用 form 的 onsubmit 事件就行了,点登录或者回车都会调用 onsubmit 事件,在事件回调里面做事情就行

@charlie0129
Copy link
Member

charlie0129 commented Jul 27, 2022

噢草,原来原代码里面都没用 form 啊,原来就很 hacky ,除非改成 form ,那你确实只能这样

@charlie0129
Copy link
Member

Good job!

@charlie0129 charlie0129 merged commit 892fe15 into e-dialect:master Jul 27, 2022
@123daxian
Copy link
Collaborator Author

hh一开始有参考给的那个思路,不过最后还是选择了这样吧

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