From d740370f2f6ded435b6cb04b5eefa3e9e9daf29d Mon Sep 17 00:00:00 2001 From: rookie4show Date: Fri, 1 Mar 2024 23:38:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=AE=80=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BE=A1=E9=AD=82=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShikigamiProperty.vue | 27 +++++++++++++++++++++++---- src/components/YuhunSelect.vue | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/components/ShikigamiProperty.vue b/src/components/ShikigamiProperty.vue index 39a8ed0..4a7eb32 100644 --- a/src/components/ShikigamiProperty.vue +++ b/src/components/ShikigamiProperty.vue @@ -4,7 +4,7 @@ :showYuhunSelect="showYuhunSelect" :currentShikigami="currentShikigami" @closeYuhunSelect="closeYuhunSelect" - @updateShikigami="updateShikigami" + @updateYuhunSelect="updateYuhunSelect" /> --> + + + - + + + @@ -139,11 +146,12 @@ export default { data() { return { - showYuhunSelect:false, + showYuhunSelect: false, propertyData: propertyData, shikigami: { edit: false, yuhun: { + yuhunSetEffect: [], target: "伤害输出", property2: "", property4: "", @@ -183,11 +191,22 @@ export default { // this.index = index; }, closeYuhunSelect() { - console.log("==== 选择御魂 ==="); + console.log("==== 关闭御魂选择 ==="); // this.currentShikigami = item; this.showYuhunSelect = false; // this.index = index; }, + updateYuhunSelect(yuhun) { + this.showYuhunSelect = false; + console.log("==== 完成御魂选择 ==="); + console.log(yuhun); + console.log(this.shikigami.yuhun.yuhunSetEffect); + let length = this.shikigami.yuhun.yuhunSetEffect.length; + this.shikigami.yuhun.yuhunSetEffect.push(JSON.parse(JSON.stringify(yuhun))) + console.log(this.shikigami.yuhun.yuhunSetEffect); + console.log(this.shikigami.yuhun.yuhunSetEffect[0]); + + }, cancel() { console.log("cancel===="); this.$emit("closeProperty"); diff --git a/src/components/YuhunSelect.vue b/src/components/YuhunSelect.vue index 56ef504..df14d5f 100644 --- a/src/components/YuhunSelect.vue +++ b/src/components/YuhunSelect.vue @@ -122,7 +122,7 @@ export default { }, confirm(i) { console.log("confirm===="); - this.$emit("updateShikigami", JSON.parse(JSON.stringify(i))) + this.$emit("updateYuhunSelect", JSON.parse(JSON.stringify(i))) // this.current = {}; }, filterShikigamiByRarity(yuhunType) {