Skip to content

$scopedSlots are missing non-scoped slot functions when using @vue/compat #8869

Description

@xanf

Vue version

3.3.4

Link to minimal reproduction

https://stackblitz.com/edit/js-y4s9r7?file=index.js

Steps to reproduce

  1. Open reproduction
  2. Observe that $slots count and $scopedSlots count is out of sync

What is expected?

$scopedSlots have all available slots, including non-scoped ones

What is actually happening?

$scopedSlots explicitly ignores non-scoped slots (like it was <Vue 2.6)

System Info

No response

Any additional comments?

This behaviour is explicitly added in 7f93c76

However, this is not the behaviour of Vue.js 2: see https://stackblitz.com/edit/js-gdxvd8?file=index.js,index.html

I've also explicitly added to the bottom of Vue.js 2 sandbox copy& paste of this test: https://github.com/vuejs/core/blob/main/packages/vue-compat/__tests__/instance.spec.ts#L286-L303 to demonstrate that test also check non-Vue.js 2 behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions