Skip to content
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

[bug] createComponent singleRoot check should not be true when it has v-for #299

Open
yyx990803 opened this issue Dec 1, 2024 · 1 comment

Comments

@yyx990803
Copy link
Member

Given this

<Comp v-for="i in 10000" />

Current codegen (the 4th argument true indicates a child component that is also the root of the parent):

return ((_ctx) => {
  const n0 = _createFor(() => (10000), (_ctx0) => {
    const n2 = _createComponent(Comp, null, null, true)
    return n2
  })
  return n0
})()

Expected:

return ((_ctx) => {
  const n0 = _createFor(() => (10000), (_ctx0) => {
-   const n2 = _createComponent(Comp, null, null, true)
+   const n2 = _createComponent(Comp)
    return n2
  })
  return n0
})()
@LittleSound
Copy link
Member

Has it been fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants