Vue-next: render function, template and v-for Inconsistent performance

Created on 5 Sep 2020  路  5Comments  路  Source: vuejs/vue-next

Version

3.0.0-rc.10

Reproduction link

https://codesandbox.io/s/holy-night-tcdjf?file=/src/App.vue

Steps to reproduce

When I render default slot with render function, template and v-for, I found that they were not the same. Please see the test example for specific performance.

What is expected?

These three forms are consistent

What is actually happening?

These three forms are not consistent

All 5 comments

These three forms are consistent

Please be more precise, what do you exactly expect to be the same?

These three forms are consistent

Please be more precise, what do you exactly expect to be the same?

Slots length is not same.

in v3, v-for is compiled as a single fragment node. You will need to check the fragment's children for the list items.

@yyx990803 Why? Why I get this single fragment node when I getting slots? but in HTML I see only elements without the node

Was this page helpful?
0 / 5 - 0 ratings