-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How can I use template in preview slot? #17
Comments
Although the error is not raised in my case, the <template>
<div>
<slot></slot>
</div>
</template>
<preview lang="md">
<script setup>
import TestPreview from './TestPreview.vue'
const msgs= ['1', '2']
</script>
<template v-for="msg in msgs">
<TestPreview>
test {{ msg }}
</TestPreview>
</template>
</preview> Note |
Thanks. It works. |
https://vuejs.org/guide/components/slots.html#fallback-content |
How can I preview component with slot? I cannot put template in the preview slot. It resulted in the error below.
Error: Codegen node is missing for element/if/for node. Apply appropriate transforms first.
The text was updated successfully, but these errors were encountered: