-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: skip esc if in composition #2991
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
refer #2989 |
有兴趣可以加一下 UI 开发者钉钉群 44551418 |
搜不到。。 |
啊这,钉钉顶部搜索栏,搜索公开群组?我看号没错 |
来了来了! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得实现的太复杂了
compositionxxx 是冒泡的,所以直接在 window 监听应该是没问题的
https://developer.mozilla.org/zh-CN/docs/Web/API/Element/compositionstart_event
剩下唯一要判断的就是当前是不是在 compose 了
的确可以 |
Codecov Report
@@ Coverage Diff @@
## main #2991 +/- ##
==========================================
+ Coverage 63.41% 63.47% +0.06%
==========================================
Files 1000 1001 +1
Lines 20405 20457 +52
Branches 5272 5285 +13
==========================================
+ Hits 12939 12986 +47
- Misses 6100 6103 +3
- Partials 1366 1368 +2
Continue to review full report at Codecov.
|
@@ -0,0 +1,26 @@ | |||
import { ref, Ref, onMounted, onUnmounted } from 'vue' | |||
|
|||
export const useOnIsCompositing: () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码还可以再优化,因为只需要一个监听器
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好哦,我当时也想过 ref 提到外面来着。react 思维惯性了
可以看一下我的处理 fca40da |
No description provided.