Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在visualforce页面中单击按钮后,我想将闪电组件插入visualforce页面。所以想做一些vf-controller的功能,然后在vf页面的apex控制器中打开一个lightning组件。
按钮单击后使用功能,但您需要为其创建一个应用程序
<div id="lightning" /> <script> $Lightning.use("c:Test", function() { $Lightning.createComponent("c:testCMP", "lightning", function(cmp) { // do some stuff }); }); </script>
您需要创建一个照明应用程序并在其中添加依赖项
c:Test 是 App,c:testCMP 是组件