diff --git a/src/views/product/components/addFamily.vue b/src/views/product/components/addFamily.vue index b7700bc..b6b55af 100644 --- a/src/views/product/components/addFamily.vue +++ b/src/views/product/components/addFamily.vue @@ -59,8 +59,18 @@ + + + + + Content: + + + {changeEditor(e,'content')}" :value="form.content"> + + - @@ -79,7 +89,8 @@ }, data() { return { - isShow: false, + isShow: false, + showWang: false, type: 'add', id: '', uploadOther: { @@ -93,7 +104,8 @@ sort: 0, is_visible:1, description: '', - file_ids:[] + file_ids:[], + content:'' }, rules: { title: [{ @@ -117,6 +129,10 @@ return } this.pictureList = fileList + }, + + changeEditor(e, type) { + this.form[type] = e }, submit() { if (this.id) { @@ -157,9 +173,11 @@ // show_relation: ['picture'], }).then(res => { this.form = this.base.requestToForm(res, this.form) - this.description = res.description ? res.description : '' + this.form.description = res.description ? res.description : '' + this.form.content = res.content?res.content:'' this.form.is_visible = res.is_visible?res.is_visible:0 - this.form.sort = res.sort?res.sort:0 + this.form.sort = res.sort?res.sort:0 + this.showWang = true if (res.files) { let _arr = [] res.files.map(item=>{ @@ -179,17 +197,21 @@ if (newVal) { if (this.type === 'editor') { this.getDetail() + }else{ + this.showWang = true } } else { this.id = '' this.type = "add" - this.pictureList = [] + this.pictureList = [] + this.showWang = false this.form = { title: '', sort: 0, is_visible:1, description: '', - file_ids: '', + file_ids: '', + content:'' } this.$refs['dialog'].reset() } @@ -202,7 +224,8 @@