美文网首页
2020-04-28 在 VF Page 里面引用 Lightn

2020-04-28 在 VF Page 里面引用 Lightn

作者: 古月的小七 | 来源:发表于2020-06-11 15:31 被阅读0次

    三步可以实现在 VF Page 里面引用 Lightning Component:

    1. Add the <apex:includeLightning /> component to your Visualforce page.
    2. Reference a Lightning app that declares your component dependencies with
      Lightning.use().
    3. Write a function that creates the component on the Visualforce page with
      $Lightning.createComponent().
    <apex:page standardController=”Contact”>        
        <apex:includeLightning />
        <div id=”Con” />
        <script>
            $Lightning.use(“c:myLightningApp”, function() {
                $Lightning.createComponent(
                    “c:FormContact”,
                    {},
                    “Con”,
                    function(cmp) {
                        console.log(“Component is created!”);
                        console.log(cmp);
                    });
                });        
          </script>
    </apex:page>
    

    具体引用可以参照这个 Link

    补充在 VF Page 里面去引用 VF Page的方法:
    Ex :- <apex:include pagename=”actionstatus”/>.

    相关文章

      网友评论

          本文标题:2020-04-28 在 VF Page 里面引用 Lightn

          本文链接:https://www.haomeiwen.com/subject/airvwhtx.html