Skip to content

slot fallback content is always rendered even when not used #10926

Open
@houfeng0923

Description

@houfeng0923

Version

2.6.10

Reproduction link

https://codesandbox.io/s/vue-test-default-slot-always-exec-syuny

Steps to reproduce

when computed props or method declared in slot fallback , looks like this:

// XXX component

<slot>
       no render, but always run {{p}}, {{print()}} <Func/> 
</slot>

// use it 
<XXX>
 actual replaced content 
</XXX>

What is expected?

computed and method not invoked , because they can't render

What is actually happening?

computed is invoked once change.
method is invoked once render .

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