Repository navigation
fix(components): 修复 H5 Swiper 初始化、卸载和重建生命周期 #19353
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
Merged
Single-Dancer
merged 10 commits into
NervJS:main
from
niljie:fix/swiper-loop-destroy-wrapper
Oct 19, 2026
+533
−130
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9aca7ed
fix(components): guard swiper loop destroy
2562fdb
fix(components): manage swiper initialization and connection lifecycle
c832d11
fix(components): recover invalid swiper after DOM changes
45239ff
test(components): reproduce swiper disconnect and invalid wrapper lif…
11c0df7
docs(examples): add manual H5 swiper lifecycle reproduction
91f0abe
fix(components): preserve pending swiper current and validate slides …
a92ad91
refactor(components): simplify swiper lifecycle ownership
898a557
fix(components): clean up failed swiper initialization and preserve r…
4ee18ba
fix(components): apply pending swiper item id after reconnect
ed43692
test(components): cover detached swiper currentItemId updates
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(components): preserve pending swiper current and validate slides …
…element
- Loading branch information
commit 91f0abe7f78d1a947fd0de8228c95f61a0bdabb7
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
-loopDestroy mock 内部读取 this.slidesEl.children,slidesEl 在初始化失败时是 undefined,这样回归用例才能真实暴露“初始化失败 + destroy 二次抛错”的场景,而不是被 mock 静默护住。