bayrell / BayLang

BayLang compiler source code
https://bayrell.org/ru/docs/baylang
Apache License 2.0
4 stars 0 forks source link

Slot params #170

Open ildar-ceo opened 2 months ago

ildar-ceo commented 2 months ago

Пример

<temlate>
    <TestComponent>
        <slot name="item" args="Dict params">
            <div class="label">{{ params.get("label") }}</div>
        </slot>
    </TestComponent>
</template>

Компонент

<template>
    <div class="test_component">
        %render this.renderSlot("item", {"label": "Test1"});
        %render this.renderSlot("item", {"label": "Test2"});
        %render this.renderSlot("item", {"label": "Test3"});
    </div>
</temlate>