Do dynamic props exist in Svelte 3

后端 未结 1 1115
醉酒成梦
醉酒成梦 2021-01-15 04:59

When I iterate over a dynamic component like:

         


        
相关标签:
1条回答
  • 2021-01-15 05:09

    Yes. You need spread props:

    <svelte:component this={upload_component} bind:action={restart} {...someprops}/>
    

    (Note that bindings and event listeners are not included in those props — but you can always pass down a callback function among your props.)

    0 讨论(0)
提交回复
热议问题