From 75550e1bd16611d11ffac577f14ba743c6711338 Mon Sep 17 00:00:00 2001
From: yumenghui <953181891@qq.com>
Date: 星期一, 07 八月 2023 20:33:22 +0800
Subject: [PATCH] 按钮及附件修改

---
 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