本篇参考: Configure a Component for Dynamic Interactions in the Lightning App Builder - Salesforce Lightning Component Library Salesforce Help | Article GitHub - trailheadapps/dreamhouse-lwc: Sample application for Lightning Web Components on Salesforce…
本篇参考: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_get_record_notify https://developer.salesforce.com/docs/component-library/documentation/en/lwc/reference_notify_record_update 我们在Salesforce LWC学习(二十九) ge…
我们在上篇介绍了 @track / @api的区别.在父子 component中,针对api类型的变量,如果声明以后就只允许在parent修改,son component修改便会导致报错. sonItem.html <template> <lightning-input value={itemName} onchange={changeItemName} label="item name"></lightning-input> </templa…
本篇参考: https://developer.salesforce.com/docs/component-library/bundle/lightning-file-upload/documentation https://developer.salesforce.com/docs/component-library/bundle/lightning-input/specification 在salesforce中,上传附件是一个经常做的操作,在标准的功能基础上,lwc自然也封装了自定义的实现…
本篇参考:https://developer.salesforce.com/docs/component-library/bundle/lightning-progress-indicator/example 我们在实际项目中有的时候要使用展示类似opportunity path的这种进度的标签,当然 lwc已经给做好了标签和demo,我们第一版进行一个简单的制作.直接上代码 testProgressIndicator.html <template> <lightning-card ti…
本篇参考:https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation 我们在项目中会用到针对table等显示 dynamic action的情况,即基于每行的特有属性,展示这行满足条件的action.比如我们的一个文件目录的管理系统,针对文件的操作,我们可以修改文件名称以及删除文件,如果当前的行代表目录的话,我们可以添加子目录操作,这个添加子目录就是针对目录类型的…
本篇参考: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_directiveshttps://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_conditional 基于条件的组件渲染在我们实际项目中100%的使用,所以做过 lwc的项目的人,对 if…
本篇参考:https://trailhead.salesforce.com/content/learn/superbadges/superbadge_lwc_specialist 我们做lwc的学习时,因为很多人可能还没接触过lwc的项目,所以通过学习知道很多的知识点,但是可能没有机会做到一个小项目,salesforce lwc superbadge正好可以在将知识点串起来基础上,深化学习,当一个小项目练手.首先先按照上方的superbadge要求,安装一个unlocked package,然后…
在Salesforce LWC学习(八) Look Up组件实现篇中,我们实现了公用的lookup组件,使用的过程中,会发现当我们输入内容以后,搜索出来的列表便无法被清空. 针对此种情况我们打算优化一下代码,针对前端的输入框,增加onblur函数,当鼠标移除情况下,设置searchTerm为空字符串并且不让下方的options展示,当鼠标移入或者输入内容情况下在展示下方的options. customLookUpForLwc.html:输入框添加onblur,下方options使用变量控制显隐…
本篇参考: https://developer.salesforce.com/docs/component-library/bundle/force:hasRecordId/documentation https://developer.salesforce.com/docs/component-library/documentation/en/lwc/use_record_context Salesforce LWC学习(三十六) Quick Action 支持选择 LWC了 我们在使用lwc…