[WIP] fix: handle v-for to singleRoot #305
Open
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 PR is work in progress.
Overview
This PR is related to #299.
As my comment:
I then tried adding a condition to check whether the root component has a single root and whether it includes
v-for
.The test case I added passed, but some existing test cases failed due to snapshot differences.
Need Help and Suggestions
I would appreciate any suggestions or guidance on how to solve this issue.
Especially, I’d like to know the best way to determine if a node is the root and is associated with
v-for
, so I can refine my condition.If my approach is not ideal or does not align with your expectations, please let me know, and I will update my code accordingly.