yshop1.8发布,新增素材管理等,详细查看readme或登录网站后台查看

This commit is contained in:
hupeng
2020-01-10 22:59:16 +08:00
parent 509669fe9f
commit 0fade96648
37 changed files with 1025 additions and 77 deletions

View File

@ -8,7 +8,7 @@
<el-input v-model="form.author" style="width: 370px;" />
</el-form-item>
<el-form-item label="封面">
<pic-upload v-model="form.imageInput" style="width: 370px;" />
<MaterialList v-model="form.imageArr" style="width: 370px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="简介">
<el-input v-model="form.synopsis" style="width: 370px;" rows="5" type="textarea" />
@ -29,8 +29,9 @@ import { add, edit } from '@/api/yxArticle'
import picUpload from '@/components/pic-upload'
import editor from '../../components/Editor'
import yamedit from '@/components/YamlEdit'
import MaterialList from '@/components/material'
export default {
components: { editor, picUpload, yamedit },
components: { editor, picUpload, yamedit, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -46,6 +47,7 @@ export default {
title: '',
author: '',
imageInput: '',
imageArr: [],
synopsis: '',
content: '',
shareTitle: '',
@ -65,6 +67,13 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.imageInput = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()

View File

@ -152,6 +152,7 @@ export default {
title: data.title,
author: data.author,
imageInput: data.imageInput,
imageArr: data.imageInput.split(','),
synopsis: data.synopsis,
content: data.content,
shareTitle: data.shareTitle,