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

---
 02 - basic/basics-03-events-starting-code/index.html |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/02 - basic/basics-03-events-starting-code/index.html b/02 - basic/basics-03-events-starting-code/index.html
index d9e2c00..bdcb807 100644
--- a/02 - basic/basics-03-events-starting-code/index.html
+++ b/02 - basic/basics-03-events-starting-code/index.html
@@ -9,8 +9,7 @@
       rel="stylesheet"
     />
     <link rel="stylesheet" href="styles.css" />
-    <script src="https://unpkg.com/vue@3.4.9/dist/vue.global.js"></script> 
-
+    <script src="https://unpkg.com/vue@3.4.9/dist/vue.global.js" defer></script>
     <script src="app.js" defer></script>
   </head>
   <body>
@@ -21,9 +20,18 @@
       <h2>Events in Action</h2>
       <button v-on:click="add(5)">Add 5</button>
       <button v-on:click="sub(5)">Subtract 5</button>
+      <p v-once>Starting counter: {{ counter }}</p>
       <p>Result: {{ counter }}</p>
-      <input type="text" v-on:input="setName">
-      <p>Il tuo nome: {{ name }}</p>
+      <input
+        type="text"
+        v-on:input="setName($event)"
+        v-on:keyup.enter="confirmInput()"
+      />
+      <p>Il tuo nome: {{ confirmedName }}</p>
+      <form v-on:submit.prevent="submitForm">
+        <input type="text" />
+        <button>Sign Up</button>
+      </form>
     </section>
   </body>
 </html>

--
Gitblit v1.8.0