8000 Attribute spread operator support · Issue #97 · spatie/laravel-blade-x · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Attribute spread operator support #97
Closed
@Gummibeer

Description

@Gummibeer

The idea I have is something like ...attr="$el" as a replacement for :class="$el['class']" :src="$el['src']". So like the opposite of compact(). Or even only ...$el because I would say that the spreaded attribute name would be ignored anyway.

<x-img ...$img />
// vs
<x-img :src="$img['src']" :alt="$img['alt']" :class="$img['class']" />

The $img variable should be an array or arrayable but has to have strings, which should get kebabed, as keys.

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

      0