lilei vor 4 Jahren
Ursprung
Commit
bd0989e9b2
1 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
  1. 2 3
      src/views/productManagement/productBrand/editModal.vue

+ 2 - 3
src/views/productManagement/productBrand/editModal.vue

@@ -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
           }