AURA Component:(命名:YAXIN_SearchCmp)
<aura:component controller="KnowledgeSiteController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
test
</aura:component>
AURA Component App:(命名:YAXIN_SearchApp)
<aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess">
<aura:dependency resource="c:YAXIN_SearchCmp" type="COMPONENT"/>
</aura:application>
VF Page:
<apex:page showHeader="false" sidebar="false">
<apex:includeLightning />
<div id="lightning" />
<script>
$Lightning.use("c:YAXIN_SearchApp", function() {
$Lightning.createComponent("c:YAXIN_SearchCmp",
"",
"lightning",
function(cmp) {
// do some stuff
});
},
);
</script>
</apex:page>