Prechádzať zdrojové kódy

管理后台-创建门店

panyong 3 rokov pred
rodič
commit
04ffc4233f

+ 2 - 1
htmldev/manage/src/utils/rules.js

@@ -177,7 +177,8 @@ const formRules = {
   required: [{ required: true, min: 1, message: '必填', trigger: 'blur' }],
   numPot2: [{ required: true, validator: checkNumPot2, trigger: 'blur' }],
   InterNum: [{ required: true, validator: checkInterNum, trigger: 'blur' }],
-  coins: [{ required: true, validator: checkInterNum, trigger: 'blur' }]
+  coins: [{ required: true, validator: checkInterNum, trigger: 'blur' }],
+  uploadImgs: [{ type: 'array', required: true, message: '请选择图片', trigger: ['change', 'blur'] }]
 }
 
 Vue.prototype.formRules = formRules

+ 2 - 1
htmldev/manage/src/views/business/outlet/details.vue

@@ -23,7 +23,8 @@
                     placeholder="请输入门店地址"
                     clearable></el-input>
         </el-form-item>
-        <el-form-item :rules="formRules.required"
+        <el-form-item prop="bar_img_url"
+                      :rules="formRules.uploadImgs"
                       label="门店图片:">
           <el-upload :on-remove="handleRemove"
                      :on-success="handleAvatarSuccess"