如何:在 Canvas 上找到某个组件,在“component:add”事件中
大家好, let say i've added block <form> on canvas. When i adding next <form> (second time) , 需要检查:如果这个组件已经存在于画布上, call function implodeComponents(presentedComp, recentlyAddedComp){} But, On event editor.on('component:add'... i can work only with recently added component. 问题是:如何在画布上穿越所有组件,找到特殊的组件(例如<form>) 请看看 http://prnt...
konstantin55000
感谢您的关注。 我刚看完那个纪录片。 最终得到了这个解决方案: editor.on('component:add', function(currentComp) { if (currentComp.attributes.tagName == “form”){ var modelList = (domComps.getComponents()).models; var presentForms = modelList.filter(function(component) {...
ionic666
@konstantin55000 嗨,兄弟,domComps.getComponents() 正在获取所有模型,我只想拿到按钮。我该怎么做?谢谢
lock[bot]
由于关闭后没有近期活动,该帖子已被自动锁定。请为相关漏洞开启新一期。