Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG | createReusableTemplate | break SFC single root mode #5109

@guda-art

Description

@guda-art

Describe the bug

the function createReusableTemplate return value: DefineTemplate will break SFC single root mode, Resulting scopedId in the inability to inherit from the parent component,it is a effective

original:

<template>
  <div class=“single-root”>
    <span>123</span>
    <span>123</span>
  </SingleRoot>
</div>

changed:

<template>
  <DefineTemplate>
    <span>123</span>
  </DefineTemplate>
  <div class=“single-root”>
    <ReuseTemplate />
    <ReuseTemplate />
  </div>
</template>

Looking forward to eliminating side effects

Reproduction

see Describe, it easy to understand

System Info

vue ^3.5.16

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions