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]+/, '')