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-assignment-problem/app.js | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/03 - lists conditional/lists-cond-assignment-problem/app.js b/03 - lists conditional/lists-cond-assignment-problem/app.js new file mode 100644 index 0000000..6d2b2fa --- /dev/null +++ b/03 - lists conditional/lists-cond-assignment-problem/app.js @@ -0,0 +1,25 @@ +const app = Vue.createApp({ + data() { + return { + tasks: [], + taskEntered: "", + showTasks: true, + }; + }, + computed: { + toggleTitle(){ + return this.showTasks ? "Hide" : "Show" + } + }, + watch: {}, + methods: { + addTask(){ + this.tasks.push(this.taskEntered); + }, + toggleTasks(){ + this.showTasks = !this.showTasks; + } + }, + }); + + app.mount("#assignment"); \ No newline at end of file -- Gitblit v1.8.0