Explorar o código

fix: 修复设置属性时,值为零不能提交的问题

yanglzh hai 1 ano
pai
achega
2afdd8f40d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/views/iot/device/instance/component/setAttr.vue

+ 1 - 1
src/views/iot/device/instance/component/setAttr.vue

@@ -89,7 +89,7 @@ function show(row: any) {
 }
 
 function onSubmit() {
-  if (!data.value) return ElMessage('请先输入属性值!')
+  if (data.value === '' || data.value === null || data.value === undefined) return ElMessage('请先输入属性值!')
   loading.value = true
   api.product.propertySet({
     deviceKey: props.deviceKey,