From 1d17c4022a928eacff7309016cde76f29ad257fb Mon Sep 17 00:00:00 2001
From: liangxiaozhen <liangxiaozhen>
Date: 星期日, 06 八月 2023 18:45:18 +0800
Subject: [PATCH] 72_客户按钮提交
---
force-app/main/default/lwc/customUnitComp/customUnitComp.js | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/force-app/main/default/lwc/customUnitComp/customUnitComp.js b/force-app/main/default/lwc/customUnitComp/customUnitComp.js
index 420a519..89e69e5 100644
--- a/force-app/main/default/lwc/customUnitComp/customUnitComp.js
+++ b/force-app/main/default/lwc/customUnitComp/customUnitComp.js
@@ -1,23 +1,29 @@
-import { LightningElement,api } from 'lwc';
+import { LightningElement, api } from 'lwc';
export default class CustomUnitComp extends LightningElement {
@api unitValue;
@api unitOptions;
@api recordId;
+ @api isDisabled;
- connectedCallback(){
+ connectedCallback() {
+ if (this.isDisabled == null) {
+ this.isDisabled = false;
+ }
}
- handleDataChange(event){
+ handleDataChange(event) {
console.log('unitValue = ' + event.target.value);
this.unitValue = event.target.value;
- this.dispatchEvent(new CustomEvent('unitchange', {
- composed: true,
- bubbles: true,
- cancelable: true,
- detail: {
- data: { unitValue: this.unitValue, recordId: this.recordId }
- }
- }));
+ this.dispatchEvent(
+ new CustomEvent('unitchange', {
+ composed: true,
+ bubbles: true,
+ cancelable: true,
+ detail: {
+ data: { unitValue: this.unitValue, recordId: this.recordId }
+ }
+ })
+ );
}
}
\ No newline at end of file
--
Gitblit v1.9.1