This commit is contained in:
yanran200730
2022-01-20 15:25:16 +08:00
parent 271b24ade6
commit de8c4a6fc7

View File

@@ -37,7 +37,7 @@
<el-form-item v-if="form.contentType === '0'" label="正文" prop="content" style="width: 100%;" :rules="[{required: true, message: '请输入内容', trigger: 'change'}]"> <el-form-item v-if="form.contentType === '0'" label="正文" prop="content" style="width: 100%;" :rules="[{required: true, message: '请输入内容', trigger: 'change'}]">
<ai-editor v-model="form.content" :instance="instance"/> <ai-editor v-model="form.content" :instance="instance"/>
</el-form-item> </el-form-item>
<el-form-item v-if="form.contentType === '0'" label="封面图片" prop="files" style="width: 100%;"> <el-form-item v-if="form.contentType === '0' && !isHideCoverimg" label="封面图片" prop="files" style="width: 100%;">
<ai-uploader <ai-uploader
:instance="instance" :instance="instance"
v-model="form.files" v-model="form.files"
@@ -132,6 +132,7 @@
value: '1' value: '1'
} }
], ],
isHideCoverimg: false,
cateList: [] cateList: []
} }
}, },
@@ -141,6 +142,7 @@
}, },
created () { created () {
this.getModuleInfo()
this.getCateList() this.getCateList()
this.form.areaId = this.user.info.areaId this.form.areaId = this.user.info.areaId
this.disabledLevel = this.user.info.areaList.length this.disabledLevel = this.user.info.areaList.length
@@ -163,6 +165,14 @@
}) })
}, },
getModuleInfo () {
this.instance.post(`/app/appcontentmoduleinfo/queryDetailById?id=${this.$route.query.moduleId}`).then(res => {
if (res.code === 0) {
this.isHideCoverimg = res.data.styleType === '0'
}
})
},
onChange () { onChange () {
this.form.files = [] this.form.files = []
}, },