您的位置:首页 > 其它

Salesforce Lightning - 常用标签整合

2017-11-07 10:01 603 查看
aura:component

Lighting组件,
implements="flexipage:availableForAllPageTypes":在LightningAppBuilder中使用。
implements="force:appHostable":可以添加到tab,包括移动端和电脑端。
lightning:actionOverride : 可以重写Action


aura:attribute

组件中的属性,name"",type="".


aura:handler

事件处理器,action="", name="init(或其他)" ,value={!this},处理初始化event,也可以处理自定义事件


<aura:handler event="c:AccountsLoaded" action="{!c.accountsLoadedInJs}"/>


aura:iteration

迭代器,迭代其中的元素,可以用于显示列表数据


<ul>
<aura:iteration items="{!v.accounts}" var="account">
<c:AccountListItem account="{!account}"/>
</aura:iteration>
</ul>


ltng:require

引入外部资源或者Js脚本。


<ltng:require
scripts="/resource/leaflet/leaflet.js"
styles="/resource/leaflet/leaflet.css"
afterScriptsLoaded="{!c.jsLoaded}" />


aura:registerEvent

注册event


<aura:registerEvent name="accountsLoaded" type="c:AccountsLoaded"/>


Lightning Component JS controller调用VF页面

$A.get("e.force:navigateToURL").setParams(
{"url": "/apex/pageName"}).fire();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: