From 2852fa40eafa08dfe82c0e3b30dba8d531d84efd Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 22 Jul 2026 14:15:30 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E7=89=A9=E8=81=94=E8=AE=BE?= =?UTF-8?q?=E5=A4=87-=E7=BC=96=E8=BE=91-=E5=80=8D=E7=8E=87=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/components/DeviceAttributeForm.vue | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/views/iot/device/components/DeviceAttributeForm.vue b/src/views/iot/device/components/DeviceAttributeForm.vue index b2761d3e..b0229d4b 100644 --- a/src/views/iot/device/components/DeviceAttributeForm.vue +++ b/src/views/iot/device/components/DeviceAttributeForm.vue @@ -95,33 +95,6 @@ const formData = ref({ deviceId: undefined as number | undefined }) -const ratioEnabledTypes = new Set([ - 'uint8', - 'uint16', - 'uint32', - 'uint64', - 'int8', - 'int16', - 'int32', - 'float32', - 'float64' -]) - -const ratioEnabled = computed(() => { - const v = formData.value.dataType - if (!v) return false - return ratioEnabledTypes.has(v) -}) - -watch( - () => formData.value.dataType, - () => { - if (!ratioEnabled.value) { - formData.value.ratio = undefined - } - } -) - const handleAttributeCodeInput = (val: string) => { const sanitized = (val || '').replace(/[^A-Za-z0-9_]/g, '') formData.value.attributeCode = sanitized.replace(/^[0-9]+/, '')