From 8c672a568ad096f28d4c3a2ba95b01ecc30cc3ce Mon Sep 17 00:00:00 2001 From: Cristiano Magro <cristiano.magro@vola.it> Date: Thu, 26 Dec 2024 23:51:23 +0100 Subject: [PATCH] draw bar healt after attack --- 03 - lists conditional/lists-cond-06-lists-keys/app.js | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/03 - lists conditional/lists-cond-06-lists-keys/app.js b/03 - lists conditional/lists-cond-06-lists-keys/app.js new file mode 100644 index 0000000..d5b295d --- /dev/null +++ b/03 - lists conditional/lists-cond-06-lists-keys/app.js @@ -0,0 +1,18 @@ +const app = Vue.createApp({ + data() { + return { + enteredGoalValue: '', + goals: [] + }; + }, + methods: { + addGoal() { + this.goals.push(this.enteredGoalValue); + }, + removeGoal(idx) { + this.goals.splice(idx, 1); + } + } +}); + +app.mount('#user-goals'); \ No newline at end of file -- Gitblit v1.8.0