-
Notifications
You must be signed in to change notification settings - Fork 51
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
Let fragment could be used in v-for #31
Conversation
That sounds useful. I wonder if there's any side effects... I'll try to review it soon but i'm honestly overloaded with work :/ if someone else wants to try/test it, please also try. |
My commit solved two problems when using fragment in v-for:
|
I found a bug, argument 'ref' of insertBefore might be null, so I added a judgement |
I tested this. I put a fragment with 2 list items along with a regular component in a ul element. I for one suggest that this be pulled. Just be sure to update browserslist. npm i --save browserslist. The current commit says that caniuse-lite is outdated forever. |
I found this solution has a critical defect in complex hierarchical structure
|
nested fragment may cause excetions when Vue update vnodes I found in latest Vue, fragment could be implemented by using functional component:
|
@kerlw could you provide a working jsfiddle ? I tried : https://jsfiddle.net/bqfoky5u/1/ but it won't work. |
I'm so sorry, I'v made a stupid mistake. This solution only works in our project, because each component would be converted by our converter, and wrapped by a element, so it dose work. So, here is the old one fragment I've modified, trying to solve nested fragment problems, not solved perfectly, but does work in most situation: https://gist.github.com/kerlw/e8579089f6dc8fa48ad9089772b5255e |
hook insertBefore/removeChild/appendChild 1. parent is fragment 2. child is a mounted fragment
1. use hooked Node's prototype functions to do the fragment logical 2. use document fragment to improve efficiency
I'v commit my code to the pull request, I hope it would help you. |
please merge :) |
Tried using your version @kerlw and I get a freeze undefined. |
@shaniqwa did you use the fork without problem ? |
There is a pure HTML solution for rendering a tree like a table using css properties |
Hello, @kerlw const unfreeze = (object, property, value = null) => { at the root of index.js Thank again, |
Any update for this pull request |
This PR needs to be cleaned up, there shouldn't be all this stuff in index.js, indentation is also apocalyptic |
I need this fixed also. |
@yushko2015 as @Tofandel mentioned the PR doesn't look like fitting. You can fork the fork and propose your PR on the side? |
No description provided.