From ab9c2faca69e33f2068f06df11e1da0c2f3856fa Mon Sep 17 00:00:00 2001 From: Eratosici Date: Tue, 4 Jan 2022 09:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E6=A0=BC=E9=95=BF=E5=BA=A6=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mall4v/src/views/modules/prod/spec-add-or-update.vue | 8 ++++++++ 1 file changed, 8 insertions(+) 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 57ec96b..5357a3b 100644 --- a/mall4v/src/views/modules/prod/spec-add-or-update.vue +++ b/mall4v/src/views/modules/prod/spec-add-or-update.vue @@ -92,6 +92,14 @@ export default { this.$message.error('规格项不能为空') return } + if (this.dataList[0].propName.length > 10) { + this.$message.error('属性名称长度不能大于10') + return + } + if (this.dataList[0].prodPropValues.find(el => el.propValue.length > 20)) { + this.$message.error('属性值长度不能大于20') + return + } this.$http({ url: this.$http.adornUrl(`/prod/spec`), method: this.dataList[0].propId ? 'put' : 'post',