alibaba / lowcode-engine

An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系
https://lowcode-engine.cn
MIT License
14.64k stars 2.55k forks source link

JSSlot如何获取父组件的属性值 #2743

Open starsoul666 opened 11 months ago

starsoul666 commented 11 months ago

image 组件的children是一个JSSlot,如果通过jsslot的params参数给jsslot中的子组件传递属性值

liujuping commented 11 months ago

看一下这个文档

https://lowcode-engine.cn/site/docs/guide/appendix/setterDetails/slot#%E5%B8%A6%E5%8F%82%E6%95%B0%E7%9A%84%E6%8F%92%E6%A7%BD%E7%A4%BA%E4%BE%8B

starsoul666 commented 11 months ago

这个要求jsslot是个方法,如果是组件的children如何处理?

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年12月06日 17:13 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [alibaba/lowcode-engine] JSSlot如何获取父组件的属性值 (Issue #2743) |

看一下这个文档

https://lowcode-engine.cn/site/docs/guide/appendix/setterDetails/slot#%E5%B8%A6%E5%8F%82%E6%95%B0%E7%9A%84%E6%8F%92%E6%A7%BD%E7%A4%BA%E4%BE%8B

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

liujuping commented 11 months ago

传递属性值,JSSlot 必须是个方法哈,否则就没有办法做到了。