规格长度限制

This commit is contained in:
Eratosici
2022-01-04 09:36:08 +08:00
parent 77b4ece1f9
commit ab9c2faca6

View File

@@ -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',