Skip to content

Clarify in documentation that "slot-scope" is named "scope" before 2.5.0 #1955

Closed
@xak2000

Description

@xak2000

The guide about Scoped Slots says:

In 2.5.0 , slot-scope is no longer limited to the <template> element, but can instead be used on any element or component in the slot.

But it is not says, that until 2.5.0, slot-scope doesn't work at all, even inside <template> element. To make it work, It must be scope inside <template> element.

It will be good to mention in the same warning element in documentation, that slot-scope not works until 2.5.0 and scope must be used instead.

Something, like:

Until 2.5.0, slot-scope was named scope and was limited to the <template> element.
In 2.5.0 , slot-scope is no longer limited to the <template> element, but can instead be used on any element or component in the slot.

I spend several hours trying to understand why it says that this functionality should work from 2.1.0+, but it doesn't work until 2.5.0. And the reason: it works! Just slot-scope should be scope. :)

Related issue: #1223 but it fixed it only in API docs (not in the guide).
Related commit: vuejs/vue@dae173d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions