From 966d8fe90597d00007f6f2914c32669caa7872b2 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 24 Apr 2025 09:45:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/components/addFamily.vue | 39 +++++++++++++++++----- 1 file changed, 31 insertions(+), 8 deletions(-) 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 @@ + + - @@ -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 @@