From 23a5b79eccf94696fbe05d581ed1d5b9dee4ff4e Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 15 Sep 2023 16:00:03 +0800 Subject: [PATCH] fix --- src/const/modules.js | 4 ++-- src/pages/article/add/index.vue | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/const/modules.js b/src/const/modules.js index 3c5d70c..d092af2 100644 --- a/src/const/modules.js +++ b/src/const/modules.js @@ -5471,7 +5471,8 @@ export default { type: 'upload', prop: 'pic', label: '图片', - required: true + width: 392, + height: 247 }, { type: 'input', @@ -5921,7 +5922,6 @@ export default { type: 'upload', prop: 'pic', label: '图片', - required: true, width: 392, height: 247 }, diff --git a/src/pages/article/add/index.vue b/src/pages/article/add/index.vue index 0955fa5..f58a1e2 100644 --- a/src/pages/article/add/index.vue +++ b/src/pages/article/add/index.vue @@ -858,9 +858,6 @@ export default { publicationYear: [ { required: true, message: '请选择出版年份', trigger: 'change' } ], - titleImg: [ - { required: true, message: '请上传封面图', trigger: 'change' } - ], mainBody: [ { required: true, message: '请输入正文', trigger: 'blur' } ], @@ -1113,9 +1110,8 @@ export default { if (!form.templateStatus) { form.articleTemplate = (data.typeId === 1 || data.typeId === 4) ? data.detailStyleId : 23 } - - this.handleRules() this.getClassification() + this.handleRules() this.$nextTick(() => { this.updateTime = 0 }) @@ -1548,9 +1544,9 @@ export default { } // 非出版物类型的栏目才需要判断下列必填 if (!this.isPublication) { - if (tId === 22 || tId === 23 || tId === 24) { - if (!form.titleImg) return Util.errorMsg('请上传封面') - } + // if (tId === 22 || tId === 23 || tId === 24) { + // if (!form.titleImg) return Util.errorMsg('请上传封面') + // } if (tId === 25) { if ((!form.time || !form.time.length) && isRelease) return Util.errorMsg('请选择起止时间') form.activityStartTime = form.time[0]