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); },