From ac100de8d8e0fc85e34cde9aec6262259b12f96c Mon Sep 17 00:00:00 2001 From: Cristiano Magro <cristiano.magro@vola.it> Date: Mon, 30 Dec 2024 21:53:48 +0100 Subject: [PATCH] style scoped locali --- 07 - development setup/vue-cli-01-a-new-vue-project/src/components/FriendContact.vue | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/07 - development setup/vue-cli-01-a-new-vue-project/src/components/FriendContact.vue b/07 - development setup/vue-cli-01-a-new-vue-project/src/components/FriendContact.vue index 630e9f7..eb4fdc0 100644 --- a/07 - development setup/vue-cli-01-a-new-vue-project/src/components/FriendContact.vue +++ b/07 - development setup/vue-cli-01-a-new-vue-project/src/components/FriendContact.vue @@ -12,6 +12,7 @@ <li><strong>Phone:</strong> {{ phoneNumber }}</li> <li><strong>Email:</strong> {{ emailAddress }}</li> </ul> + <button @click="$emit('delete', id)">Delete</button> </li> </template> @@ -49,7 +50,7 @@ // } }, }, - emits:['toggle-favorite'], + emits:['toggle-favorite', 'delete'], // emits: { // 'toggle-favorite': function (id) { // if (id) { @@ -71,6 +72,9 @@ toggleFavorite() { this.$emit('toggle-favorite', this.id); }, + // deleteFriend(){ + // this.$emit('delete', this.id); + // } }, }; </script> \ No newline at end of file -- Gitblit v1.8.0