8000 Annotation nodes under the component root will affect “Fallthrough Attributes” · Issue #10087 · vuejs/core · GitHub
[go: up one dir, main page]

Skip to content
Annotation nodes under the component root will affect “Fallthrough Attributes” #10087
Closed
@hoshyo

Description

@hoshyo

Vue version

3.4.10

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-gn3drc?file=src%2FApp.vue

Steps to reproduce

You only need to create v-if and v-else structures in the <template> tag under the component root node, then append an annotation under the <template> tag, and add an annotation between if-else, and the Fallthrough Attributes will be lost.

What is expected?

Annotations should not affect Fallthrough Attributes!

What is actually happening?

When using the following structure:

<template>
   <!-- Note 1 -->
   <h1 v-if="false" data-h="1" class="inner-1">{{ msg }}</h1>
   <!-- Note 2 -->
   <h2 v-else data-h="2" class="inner-2">{{ msg }}</h2>
</template>

Fallthrough Attributes will be lost. In my example the passed class "test" is missing
This template tag is under the root node

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0