Skip to content

Allow vue named slots shorthand and start deprecating old syntax #1078

Description

@ang-zeyu

Describe the solution you'd like

Vue has a shorthand for named slots v-slot:header/slot="header" -> #nameofslot.

However, this is not usable for certain components where markbind does extra processing on the slots currently. ( such as indexing the header slot of panels )

We could add logic to these locations to also search for the corresponding name slot shorthand, allowing the user to use a friendlier syntax.

At the same time, we could start deprecating the old syntax so that we can eventually remove all logic in markbind that searches for slot="header", and rewrite corresponding vue templates to either v-slot:slotname or #slotname,
especially since it is a deprecated syntax in vue itself.

Warnings could also be shown if the old syntax is in use ( #1048 ).

Describe alternatives you've considered
na

Additional context
https://vuejs.org/v2/guide/components-slots.html#Named-Slots-Shorthand

https://vuejs.org/v2/guide/components-slots.html#Deprecated-Syntax

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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