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 --- 08 - component communication/cmp-communication-assignment-solution/src/App.vue | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/08 - component communication/cmp-communication-assignment-solution/src/App.vue b/08 - component communication/cmp-communication-assignment-solution/src/App.vue new file mode 100644 index 0000000..8567b0e --- /dev/null +++ b/08 - component communication/cmp-communication-assignment-solution/src/App.vue @@ -0,0 +1,42 @@ +<template> + <div> + <active-user :username="user.name" :userage="user.age"></active-user> + <user-data @set-data="setUserData"></user-data> + </div> +</template> + +<script> +export default { + data() { + return { + user: { + name: "Max Schwarzmüller", + age: 31, + }, + }; + }, + methods: { + setUserData(name, age) { + this.user = { + name: name, + age: +age + }; + } + } +}; +</script> + + +<style> +html { + font-family: sans-serif; +} + +section { + margin: 2rem auto; + max-width: 40rem; + border-radius: 12px; + border: 1px solid #ccc; + padding: 1rem; +} +</style> \ No newline at end of file -- Gitblit v1.8.0