Skip to content

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

Open
@yyx990803

Description

@yyx990803

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
})()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions