【问题标题】:Is It possible to use Lightning app exchange components in custom lightning app?是否可以在自定义闪电应用程序中使用闪电应用程序交换组件?
【发布时间】:2016-04-21 12:22:13
【问题描述】:

我从 app exchange 安装了一个闪电组件,现在我想在我的自定义闪电应用中使用该组件

有可能吗?

<aura:app>
//code for adding components

</aura:app>

【问题讨论】:

    标签: salesforce components lightning


    【解决方案1】:

    如果您正在使用组件:

    <aura:component >
        <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>     
        {!v.body}    
    </aura:component>
    

    在控制器中(例如“mvc:CalendarComponent”,把你的组件放在这里):

    doInit : function(component, event, helper) {
        $A.createComponent(
            "mvc:CalendarComponent",
            {
    
            },
            function(newCmp){
                if (component.isValid()) {                    
                    component.set("v.body", newCmp);
                }
            }
        );
    }
    

    【讨论】:

    • 我们不能直接使用 吗?
    猜你喜欢
    • 2018-02-15
    • 2016-12-31
    • 2020-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-24
    • 2018-06-09
    相关资源
    最近更新 更多