| force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js-meta.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.html
New file @@ -0,0 +1,5 @@ <template> <div class="exampleHolder" if:true={IsLoading}> <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> </div> </template> force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js
New file @@ -0,0 +1,45 @@ import { LightningElement, wire, api } from 'lwc'; import { CurrentPageReference } from "lightning/navigation"; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; export default class LexAccessory_Add extends LightningElement { @api recordId; IsLoading = true; @wire(CurrentPageReference) getStateParameters(currentPageReference) { if (currentPageReference) { const urlValue = currentPageReference.state.recordId; if (urlValue) { let str = `${urlValue}`; this.recordId = str; } } } connectedCallback(){ this.IsLoading = false; if (this.recordId.length == 0) { this.ShowToastEvent("请选择一个借出备品配套一览明细信息", "warning"); } else { window.open("/apex/AccessoryAdd?recid=" + this.recordId, "_top"); } } //弹框 ShowToastEvent(msg,type) { const event = new ShowToastEvent({ title: '', message: msg, variant: type }); this.dispatchEvent(event); } } force-app/main/default/lwc/lexAccessory_Add/lexAccessory_Add.js-meta.xml
New file @@ -0,0 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>54.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__RecordPage</target> <target>lightning__AppPage</target> <target>lightning__HomePage</target> <target>lightning__RecordAction</target> </targets> </LightningComponentBundle>