From c593c559f0473a6f45eeb9da4404acf694b4dbc5 Mon Sep 17 00:00:00 2001 From: wanganmao <525987762@qq.com> Date: Thu, 27 Oct 2022 11:18:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug=20=E3=80=90=E5=88=9B=E4=BD=9C?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E3=80=91=E7=83=AD=E5=8C=BA=E9=A2=98=20?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E9=A1=B5=E9=9D=A2=E8=BF=9B=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=20=E8=A2=AB=E8=AE=BF=E8=80=85=E7=AD=94?= =?UTF-8?q?=E9=A2=98=E7=95=8C=E9=9D=A2=20=E6=9C=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../questions/components/AnswerViewer.vue | 2 ++ .../Design/components/config/Config3D.vue | 25 ++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/Answer/questions/components/AnswerViewer.vue b/src/views/Answer/questions/components/AnswerViewer.vue index c1079147..20619dc2 100644 --- a/src/views/Answer/questions/components/AnswerViewer.vue +++ b/src/views/Answer/questions/components/AnswerViewer.vue @@ -114,6 +114,8 @@ export default defineComponent({ return this.scene.shelves; }, shelf() { + // 无货架默认选择第一个,后续多货架版本可能会修改 + if(!this.config.shelf) return this.shelves.find(x => true); return this.shelves.find((x) => x.planetid == this.config.shelf); }, wares() { diff --git a/src/views/planetDesign/Design/components/config/Config3D.vue b/src/views/planetDesign/Design/components/config/Config3D.vue index b9afacbc..4e2bca58 100644 --- a/src/views/planetDesign/Design/components/config/Config3D.vue +++ b/src/views/planetDesign/Design/components/config/Config3D.vue @@ -280,15 +280,15 @@ export default { immediate: true, deep: true, }, - scene: { - handler(val) { - if (this.scene && !this.configTemp.scene_information) { - this.configTemp.scene_information = JSON.parse( - JSON.stringify(val) - ); - } - } - }, + // scene: { + // handler(val) { + // if (this.scene && !this.configTemp.scene_information) { + // this.configTemp.scene_information = JSON.parse( + // JSON.stringify(val) + // ); + // } + // } + // }, }, computed: { QUESTION_TYPE: () => QUESTION_TYPE, @@ -353,6 +353,13 @@ export default { }, onUpdate() { + + if (this.scene) { + this.configTemp.scene_information = JSON.parse( + JSON.stringify(this.scene) + ); + } + this.$emit("update:config", this.configTemp); this.$emit("changeConfig", this.configTemp); },