From 07277a6efb6dada37b8f1f27b9c914ca50a2dfda Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 21 Mar 2025 12:13:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=91IoT:=20=E8=A7=84=E5=88=99=E5=9C=BA=E6=99=AF=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E5=99=A8=E7=9B=B8=E5=85=B3=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule/scene/components/DeviceListener.vue | 23 +++++++++++++++---- .../components/DeviceListenerCondition.vue | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/views/iot/rule/scene/components/DeviceListener.vue b/src/views/iot/rule/scene/components/DeviceListener.vue index 92e1d36e7..57f2fe8ab 100644 --- a/src/views/iot/rule/scene/components/DeviceListener.vue +++ b/src/views/iot/rule/scene/components/DeviceListener.vue @@ -21,7 +21,7 @@ 选择设备 - +
@@ -41,9 +41,19 @@ :model-value="conditionParameter" @update:model-value="(val) => (conditionParameters[index] = val)" class="mb-10px last:mb-0" - /> + > + + +
-
+
@@ -71,9 +81,14 @@ const emit = defineEmits(['update:modelValue']) const triggerType = ref() const messageType = ref('property') const conditionParameters = ref([]) +/** 添加触发条件 */ const addConditionParameter = () => { conditionParameters.value?.push({} as IotRuleSceneTriggerConditionParameter) } +/** 移除触发条件 */ +const removeConditionParameter = (index: number) => { + conditionParameters.value?.splice(index, 1) +} onMounted(() => { addConditionParameter() }) @@ -88,7 +103,7 @@ onMounted(() => { .device-listener-delete { position: absolute; top: auto; - right: 33px; + right: 16px; bottom: auto; } } diff --git a/src/views/iot/rule/scene/components/DeviceListenerCondition.vue b/src/views/iot/rule/scene/components/DeviceListenerCondition.vue index 261febc20..6bf48a34e 100644 --- a/src/views/iot/rule/scene/components/DeviceListenerCondition.vue +++ b/src/views/iot/rule/scene/components/DeviceListenerCondition.vue @@ -29,6 +29,8 @@ + +