繁体   English   中英

闪电组件未显示在闪电选项卡上

[英]Lightning Component not showing on Lightning Tab

尝试创建照明标签时,看不到我的闪电组件。 其中一个组件有问题-

我在编辑组件时使用salesforce dx移动了组件和选项卡。 我正在错误以下。 我似乎在尝试编辑记录时组件之一抛出错误-

错误=查看下面的所有错误消息以更正您的数据。 您只能为AuraDefinitionBundles创建闪电选项卡,其中包含实现了force:appHostable且没有必需属性且没有默认值的组件。 (相关字段:内容)

观察-当我从父组件和子组件中删除该属性而不是其工作属性时,我能够保存该选项卡。 我的组件启动有些不正确。

父组件中的代码-

<aura:if isTrue="{!!v.customTab}">
<div aura:id="defaultTabContent" class="slds-show">
    <c:ApiRequestFieldMapping custom="false" objectName="Credit_Report__c"/>
</div>
</aura:if>
<aura:if isTrue="{!v.customTab}">
<div aura:id="customTabContent" class="slds-hide">
    <c:ApiRequestFieldMapping custom="true" listSObjects="
    {!v.listSObjects}" message="Select object from drop-down." 
    messageClass="Info"/>
</div>

子组件中的代码-

<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
<aura:registerEvent name="handleModelVisiblity" type="c:HandleModel"/>
<!-- attributes -->
<aura:attribute name="custom" type="Boolean"/>
<aura:attribute name="objectName" type="String"/>
<aura:attribute name="listSObjects" type="String[]"/>
<aura:attribute name="message" type="String"/>
<aura:attribute name="messageClass" type="String"/> 
<aura:attribute name="listSObjectFields" type="String[]" 
required="false"/>
<aura:attribute name="customObjectName" type="String" 
required="false"/>
<aura:attribute name="listWrapper" 
type="RequestMappingWrapper.MappingRecords[]" required="false"/>

已经尝试-1.我的组件已经实现了“ force:appHostable”接口。 2.我们使用的是最新版本的组件。(40.0)3.已经尝试创建组件。 4.我的组织启用了我的域,还拥有名称空间。

我已经解决了这个问题。 我已删除其中一个属性对内部类的引用。 将“ RequestMappingWrapper.MappingRecords []”更改为“ RequestMappingWrapper []”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM