From 498b475805c4383c51ef54bc3a2bc47aa63e895a Mon Sep 17 00:00:00 2001 From: Cristiano Magro <cristiano.magro@vola.it> Date: Sat, 28 Dec 2024 22:07:39 +0100 Subject: [PATCH] passaggio delle proprietà come props --- 07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue | 67 ++++++++++++++++++--------------- 1 files changed, 36 insertions(+), 31 deletions(-) diff --git a/07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue b/07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue index 34fd4d1..7a5c6ce 100644 --- a/07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue +++ b/07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue @@ -1,42 +1,48 @@ <template> - <section> - <header> - <h1>My friends</h1> - </header> - - - <ul> - <friend-contact></friend-contact> - <friend-contact></friend-contact> - </ul> - </section> + <section> + <header> + <h1>My friends</h1> + </header> + <ul> + <friend-contact + name="Manuel Lorenz" + phone-number="123" + email-address="cicio@ciccio.it" + ></friend-contact> + <friend-contact + name="Jeany Torpedo" + phone-number="123123" + email-address="torpedo@ciccio.it" + ></friend-contact> + </ul> + </section> </template> <script> export default { - data() { - return { - friends: [ - { - id: "manuel", - name: "Manuel Lorenz", - phone: "01234 5678 991", - email: "manuel@localhost.com", - }, - { - id: "julie", - name: "Julie Jones", - phone: "09876 543 221", - email: "julie@localhost.com", - }, - ], - } - }, + data() { + return { + friends: [ + { + id: "manuel", + name: "Manuel Lorenz", + phone: "01234 5678 991", + email: "manuel@localhost.com", + }, + { + id: "julie", + name: "Julie Jones", + phone: "09876 543 221", + email: "julie@localhost.com", + }, + ], + } + }, }; </script> <style> - @import url('https://fonts.googleapis.com/css2?family=Jost&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Jost&display=swap'); * { box-sizing: border-box; @@ -101,5 +107,4 @@ border-color: #ec3169; box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.26); } - </style> \ No newline at end of file -- Gitblit v1.8.0