fix: restore axis grid after visibility update#4624
Merged
Conversation
skie1997
approved these changes
Jul 15, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤔 This is a ...
💡 Background and solution
在关闭动画时,通过
updateSpec将坐标轴网格的visible从true切换为false再恢复为true,已有的 VRender grid component 可能已经从 product 上脱离。此前ComponentMark复用已有 component 时只更新 attributes,没有重新挂载,导致网格线无法恢复显示。本修复在复用 component 时检查其 parent;仅当它已脱离当前 product 时重新
appendChild。同时增加左右坐标轴网格显隐切换的回归测试。公共 API 不变,正常已挂载路径不会增加额外生命周期操作。📝 Changelog
updateSpecwith animation disabled.updateSpec隐藏并重新显示坐标轴网格后,已有网格图元未恢复的问题。☑️ Self-Check before Merge
✅ Validation
rushx test --runInBand __tests__/unit/core/update-effects.test.ts: 108/108 tests passedrushx compile: passedrush test --only tag:package: VChart 74 suites / 382 tests passed; VUtils Extension 1/1 test passed