shaogen1995 пре 3 година
родитељ
комит
ccb076df53
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/pages/collection/collectionEdit.vue

+ 2 - 2
src/pages/collection/collectionEdit.vue

@@ -90,7 +90,7 @@
             </Cropper>
           </el-form-item>
 
-          <el-form-item label="藏品图片">
+          <el-form-item label="藏品图片" v-if="ruleForm.type!=='model'">
             <el-upload
               class="avatar-uploader"
               ref="upload"
@@ -278,7 +278,7 @@ export default {
     submitForm(formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          if (!this["ruleForm"].thumb || !this["ruleForm"].filePath) {
+          if (!this["ruleForm"].thumb ||(this.ruleForm.type==='img'&&!this["ruleForm"].filePath)) {
             common.tip("warning", "请上传图片");
             return;
           }