|
@@ -52,6 +52,8 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
monthly_dialog() {
|
|
monthly_dialog() {
|
|
|
|
+ this.$refs.monthly_form.content ? this.$refs.monthly_form.clearValidate('content') : this.rules.content = [{ required: true, message: '素材不能为空', trigger: 'change' }]
|
|
|
|
+ this.$refs.monthly_form.thumb ? this.$refs.monthly_form.clearValidate('thumb') : this.rules.thumb = [{ required: true, message: '缩略图不能为空', trigger: 'change' }]
|
|
this.$refs.monthly_form.validate((valid) => {
|
|
this.$refs.monthly_form.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.$emit('monthly_created', this.monthly_form)
|
|
this.$emit('monthly_created', this.monthly_form)
|
|
@@ -64,7 +66,7 @@ export default {
|
|
},
|
|
},
|
|
handleRemoveTow(file, fileList) {
|
|
handleRemoveTow(file, fileList) {
|
|
if (fileList.length === 0) {
|
|
if (fileList.length === 0) {
|
|
- this.kfFormRules.content = [{ required: true, message: '素材不能为空', trigger: 'change' }]
|
|
|
|
|
|
+ this.rules.content = [{ required: true, message: '素材不能为空', trigger: 'change' }]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handlePictureCardPreviewTow(file) {
|
|
handlePictureCardPreviewTow(file) {
|
|
@@ -73,7 +75,7 @@ export default {
|
|
},
|
|
},
|
|
handleRemove(file, fileList) {
|
|
handleRemove(file, fileList) {
|
|
if (fileList.length === 0) {
|
|
if (fileList.length === 0) {
|
|
- this.kfFormRules.thumb = [{ required: true, message: '缩略图不能为空', trigger: 'change' }]
|
|
|
|
|
|
+ this.rules.thumb = [{ required: true, message: '缩略图不能为空', trigger: 'change' }]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handlePictureCardPreview(file) {
|
|
handlePictureCardPreview(file) {
|