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() {