qinzhipeng_v@didiglobal.com 4 năm trước cách đây
mục cha
commit
cff8509581
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      src/views/monthly/components/createdMonthly.vue

+ 6 - 2
src/views/monthly/components/createdMonthly.vue

@@ -63,14 +63,18 @@ export default {
       this.monthly_show = false
     },
     handleRemoveTow(file, fileList) {
-      console.log(file, fileList)
+      if (fileList.length === 0) {
+        this.kfFormRules.content = [{ required: true, message: '素材不能为空', trigger: 'change' }]
+      }
     },
     handlePictureCardPreviewTow(file) {
       this.monthly_form.content = 'http:' + file.url
       this.$refs.monthly_form.clearValidate('content')
     },
     handleRemove(file, fileList) {
-      console.log(file, fileList)
+      if (fileList.length === 0) {
+        this.kfFormRules.thumb = [{ required: true, message: '缩略图不能为空', trigger: 'change' }]
+      }
     },
     handlePictureCardPreview(file) {
       this.monthly_form.thumb = 'http:' + file.url