From 60ebed0a5c1422f02170e2f4d72ed357997535df Mon Sep 17 00:00:00 2001 From: rookie4show Date: Mon, 15 Apr 2024 23:21:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=A1=E9=AD=82=E6=8C=87=E6=A0=87=E5=85=B3?= =?UTF-8?q?=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShikigamiProperty.vue | 140 +++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 21 deletions(-) diff --git a/src/components/ShikigamiProperty.vue b/src/components/ShikigamiProperty.vue index 4a7eb32..3fedb20 100644 --- a/src/components/ShikigamiProperty.vue +++ b/src/components/ShikigamiProperty.vue @@ -48,7 +48,7 @@ - @@ -76,32 +76,32 @@ - - - - - + + + + - - - - - - + + + + + - - - - - - + + + + + @@ -153,9 +153,9 @@ export default { yuhun: { yuhunSetEffect: [], target: "伤害输出", - property2: "", - property4: "", - property6: "", + property2: ["Attack"], + property4: ["Attack"], + property6: ["Crit", "CritDamage"], }, levelRequired: "40", speed: "", @@ -182,6 +182,104 @@ export default { } this.current = newVal; }, + 'shikigami.yuhun.target': { + handler(newVal, oldVal) { + console.log(newVal) + console.log(JSON.stringify(this.shikigami.yuhun)) + switch (newVal) { + // + case "1": { + this.shikigami.yuhun.property2 = ["Attack"]; + this.shikigami.yuhun.property4 = ["Attack"]; + this.shikigami.yuhun.property6 = ["Crit", "CritDamage"]; + break; + } + // + case "2": { + this.shikigami.yuhun.property2 = ["Speed"]; + this.shikigami.yuhun.property4 = ["ControlHit"]; + this.shikigami.yuhun.property6 = ["Attack", "Defense", "Health", "Crit", "CritDamage"]; + break; + } + // + case "3": { + this.shikigami.yuhun.property2 = ["Speed"]; + this.shikigami.yuhun.property4 = ["ControlMiss"]; + this.shikigami.yuhun.property6 = ["Attack", "Defense", "Health", "Crit", "CritDamage"]; + break; + } + // + case "4": { + this.shikigami.yuhun.property2 = ["Health"]; + this.shikigami.yuhun.property4 = ["Health"]; + this.shikigami.yuhun.property6 = ["Health"]; + break; + } + // + case "5": { + this.shikigami.yuhun.property2 = ["Attack"]; + this.shikigami.yuhun.property4 = ["Attack"]; + this.shikigami.yuhun.property6 = ["Attack"]; + break; + } + // + case "6": { + this.shikigami.yuhun.property2 = ["Defense"]; + this.shikigami.yuhun.property4 = ["Defense"]; + this.shikigami.yuhun.property6 = ["Defense"]; + break; + } + // + case "7": { + this.shikigami.yuhun.property2 = ["Speed"]; + this.shikigami.yuhun.property4 = ["Attack", "Defense", "Health", "ControlHit", "ControlMiss"]; + this.shikigami.yuhun.property6 = ["Attack", "Defense", "Health", "Crit", "CritDamage"]; + break; + } + // + case "8": { + this.shikigami.yuhun.property2 = ["Attack", "Defense", "Health", "Speed"]; + this.shikigami.yuhun.property4 = ["Attack", "Defense", "Health", "ControlHit", "ControlMiss"]; + this.shikigami.yuhun.property6 = ["Crit"]; + break; + } + // + case "9": { + this.shikigami.yuhun.property2 = ["Attack", "Defense", "Health", "Speed"]; + this.shikigami.yuhun.property4 = ["Attack", "Defense", "Health", "ControlHit", "ControlMiss"]; + this.shikigami.yuhun.property6 = ["CritDamage"]; + break; + } + // + case "10": { + this.shikigami.yuhun.property2 = ["Speed"]; + this.shikigami.yuhun.property4 = ["Health"]; + this.shikigami.yuhun.property6 = ["Crit","CritDamage"]; + break; + } + // + case "11": { + this.shikigami.yuhun.property2 = ["Speed"]; + this.shikigami.yuhun.property4 = ["ControlHit", "ControlMiss"]; + this.shikigami.yuhun.property6 = ["Attack", "Defense", "Health", "Crit", "CritDamage"]; + break; + } + // + case "12": { + this.shikigami.yuhun.property2 = ["Defense"]; + this.shikigami.yuhun.property4 = ["Defense"]; + this.shikigami.yuhun.property6 = ["Crit", "CritDamage"]; + break; + } + } + }, + deep: true //为true,表示深度监听,这时候就能监测到a值变化 + /** + * + * + * + */ + } }, methods: { editShikigami() {