فهرست منبع

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

yanglzh 1 سال پیش
والد
کامیت
2afdd8f40d
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,