瀏覽代碼

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,