-
Notifications
You must be signed in to change notification settings - Fork 632
Open
Description
I need a slot in a list in which I can pass around the data of it's parent.
So for example, with a component like this:
import { Slot, Layout, For } from "@builder.io/mitosis";
export default function MyComponent(props) {
const example = [
"asdf",
"dsfdsdf"
]
return (
<div>
<For each={example} >
{
(item) => (
<Slot name={props.slotPage} item={item}></Slot>
)
}
</For>
</div>
);
}I'd like this ouput in Vue
<template>
<div>
<template :key="index" v-for="(item, index) in example">
<slot name="page" :item={item}></slot>
</template>
</div>
</template>
<script>
import { defineComponent } from "vue";
export default defineComponent({
name: "my-component",
});
</script>In vue you can do: <slot name="page" :item={item}></slot>, however I can't seem to figure out how to make mitosis do this.
The documentation doesn't state this as a gotcha, but it also doesn't state how to do this.
If I need to make a feature request for this, please just tell me and close the ticket.
Thanks,
Metadata
Metadata
Assignees
Labels
No labels