-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
Description
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.16Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.