소스 검색

fix: 修复属性值为空的判断

yanglzh 1 년 전
부모
커밋
9501e9ffa8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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,