|
@@ -93,9 +93,8 @@ export default {
|
|
|
if (valid) {
|
|
|
const formData = JSON.parse(JSON.stringify(_this.form))
|
|
|
formData.id = _this.itemId ? _this.itemId : undefined
|
|
|
- const re = /^[\u4E00-\u9FA5A-Za-z].{2,20}$/
|
|
|
- const r = re.test(formData.brandName)
|
|
|
- if (!r) {
|
|
|
+ const fa = formData.brandName.substr(0, 1)
|
|
|
+ if (!isNaN(fa)) {
|
|
|
this.$message.error('品牌名称只能以汉字或字母开头')
|
|
|
return false
|
|
|
}
|