From 3962c2bb0435484b60a3e408e4738d792e249a53 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 05 六月 2023 11:09:55 +0800
Subject: [PATCH] LEX CommunityNewCmp

---
 force-app/main/default/lwc/customUnitComp/customUnitComp.js |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/lwc/customUnitComp/customUnitComp.js b/force-app/main/default/lwc/customUnitComp/customUnitComp.js
new file mode 100644
index 0000000..4592b6c
--- /dev/null
+++ b/force-app/main/default/lwc/customUnitComp/customUnitComp.js
@@ -0,0 +1,27 @@
+import { LightningElement,api } from 'lwc';
+
+export default class CustomUnitComp extends LightningElement {
+    @api unitValue;
+    @api unitOptions;
+    @api recordId;
+    @api isDisabled;
+
+    connectedCallback(){
+        if(this.isDisabled == null){
+            this.isDisabled = false;
+        }
+    }
+
+    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 }
+            }
+        }));
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.1