1: $A.util.toggleClass(cmp, 'class') 来通过CSS来控制组件上的东西的样式
2:获得资源版本的方法
| Resource | Return Type | Expression |
|---|---|---|
| Apex | Version | System.requestVersion() |
| JavaScript | String | cmp.getVersion() |
| Aura component markup | String | {!Version} |
Reference Type:
- App
- /lightning/app/06mRM0000008dNrYAI
- /lightning/app/06mRM0000008dNrYAI/o/Case/home
- /lightning/app/standard__LightningSales
- /lightning/app/standard__LightningSales/o/Case/home
- External Record Page
- /{baseUrl}/{recordId}/{recordName}
- External Record Relationship Page
- /{baseUrl}/{recordId}
- Knowledge Article
- /articles/{articleType}/{urlName}
- /article/{urlName}
- Lightning Component (must implement lightning:isUrlAddressable)
- /cmp/{componentName}?c__myAttr=attrValue
- Login Page
- Managed Content Page (Salesforce CMS)
- /:urlAlias
- Named Page (Experience Cloud)
- /{URL as defined on the page’s properties}
- Named Page (Standard)
- /page/{pageName}
- Navigation Item Page
- /n/{apiName}
- Object Page
- /o/{objectApiName}/{actionName}
/o/{objectApiName}/{actionName}?filterName=Recent - /recordlist/{objectApiName}
/{baseUrl}/{objectApiName}
- /o/{objectApiName}/{actionName}
- Record Page
- /r/{objectApiName}/{recordId}/{actionName}
/r/{recordId}/{actionName} - /detail/{recordId}
/{baseUrl}/{recordId}
- /r/{objectApiName}/{recordId}/{actionName}
- Record Relationship Page
- /r/{objectApiName}/{recordId}/related/{relationshipApiName}/{actionName}
/r/{recordId}/related/{relationshipApiName}/{actionName} - /relatedlist/{recordId}/{relationshipApiName}
/{baseUrl}/related/{recordId}/{relationshipApiName}
- /r/{objectApiName}/{recordId}/related/{relationshipApiName}/{actionName}
- Web Pagehttps://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_record_home.htm
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_record_home.htm

本文介绍了如何使用 $A.util.toggleClass 方法通过 CSS 控制 Salesforce Lightning 组件样式,并提供了获取资源版本的不同方法。此外,还详细列出了各种页面类型的 URL 结构,包括应用页面、外部记录页面等。
395

被折叠的 条评论
为什么被折叠?



