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
修复 当 v-infinite-scroll 释放的时候, SCOPE 不存在导致的错误 #14776
Conversation
👋 @nianwu, seems like this is your first time contribution to element-plus.
|
@nianwu 你是否介意重新修正下代码以及pr标题 |
a6bdcc6
to
744e736
Compare
@chenxch 代码已经修复, 增加了 try_catch 防止出现其他的问题, 请查收 |
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.
这可能会
744e736
to
34c248f
Compare
@chenxch 这个标题可以么? |
ok~ |
@nianwu 需要解决一下冲突哦 |
bb77597
to
20052a3
Compare
@chenxch 请问这样可以了么? 我把我的分支 rebase 到了 dev 之后, 重新修复了一下代码。 |
🧪 Playground Preview: https://element-plus.run/?pr=14776 |
@chenxch |
const { container, onScroll } = el[SCOPE] | ||
if (SCOPE && el[SCOPE]) { | ||
const container = el[SCOPE] | ||
const onScroll = el[SCOPE] |
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.
const { container, onScroll } = el[SCOPE]
const onScroll = el[SCOPE] | ||
|
||
container?.removeEventListener('scroll', onScroll) | ||
} | ||
|
||
container?.removeEventListener('scroll', onScroll) |
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.
删除这行代码
这个Bug已经修复,详情见 #16686 |
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
详见: #14775
Related Issue
Fixes #14775.
Explanation of Changes
🤖 Generated by Copilot at 3c0788e
container
andonScroll
(link)