From d6d37720e2df8d8b64f0d8134ee25ff4bfaadfb9 Mon Sep 17 00:00:00 2001 From: Eratosici Date: Tue, 11 Jan 2022 09:23:07 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=E3=80=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mall4v/src/views/modules/order/order.vue | 9 +++++++++ .../src/views/modules/prod/spec-add-or-update.vue | 13 +++++++++++++ mall4v/src/views/modules/sys/area-add-or-update.vue | 7 ++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/mall4v/src/views/modules/order/order.vue b/mall4v/src/views/modules/order/order.vue index 5676f11..ac5c6b2 100644 --- a/mall4v/src/views/modules/order/order.vue +++ b/mall4v/src/views/modules/order/order.vue @@ -154,6 +154,8 @@ + +
暂无数据
diff --git a/mall4v/src/views/modules/prod/spec-add-or-update.vue b/mall4v/src/views/modules/prod/spec-add-or-update.vue index 5357a3b..94c6126 100644 --- a/mall4v/src/views/modules/prod/spec-add-or-update.vue +++ b/mall4v/src/views/modules/prod/spec-add-or-update.vue @@ -12,6 +12,8 @@ @@ -26,6 +28,8 @@ @@ -87,6 +91,11 @@ export default { } this.dataList[0].prodPropValues = temp } + if (!this.dataList[0].propName.trim()) { + this.dataList[0].propName = '' + this.$message.error('属性名不能为空') + return + } if (this.dataList[0].prodPropValues.length < 1) { this.dataList[0].prodPropValues = [{ valueId: 0 }] this.$message.error('规格项不能为空') @@ -96,6 +105,10 @@ export default { this.$message.error('属性名称长度不能大于10') return } + if (this.dataList[0].prodPropValues.find(el => !el.propValue.trim())) { + this.$message.error('属性值不能为空') + return + } if (this.dataList[0].prodPropValues.find(el => el.propValue.length > 20)) { this.$message.error('属性值长度不能大于20') return diff --git a/mall4v/src/views/modules/sys/area-add-or-update.vue b/mall4v/src/views/modules/sys/area-add-or-update.vue index c5e879a..738d5e4 100644 --- a/mall4v/src/views/modules/sys/area-add-or-update.vue +++ b/mall4v/src/views/modules/sys/area-add-or-update.vue @@ -9,7 +9,7 @@ label-width="100px"> - + @@ -98,6 +98,11 @@ export default { dataFormSubmit () { this.$refs['dataForm'].validate((valid) => { if (valid) { + if (!this.dataForm.areaName.trim()) { + this.dataForm.areaName = '' + this.$message.error('地区名称不能为空') + return + } this.$http({ url: this.$http.adornUrl('/admin/area'), method: this.dataForm.areaId ? 'put' : 'post',