From eb387dbd90a2a891ee5ee4458e32cccb460fd9b1 Mon Sep 17 00:00:00 2001 From: Cristiano Magro <cristiano.magro@vola.it> Date: Mon, 06 Jan 2025 18:15:48 +0100 Subject: [PATCH] first components e props --- 09 - deeper into components/cmp-adv-06-scoped-slots/src/App.vue | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/09 - deeper into components/cmp-adv-06-scoped-slots/src/App.vue b/09 - deeper into components/cmp-adv-06-scoped-slots/src/App.vue new file mode 100644 index 0000000..e1916ca --- /dev/null +++ b/09 - deeper into components/cmp-adv-06-scoped-slots/src/App.vue @@ -0,0 +1,51 @@ +<template> + <div> + <the-header></the-header> + <!-- <TheHeader /> --> + <badge-list></badge-list> + <user-info + :full-name="activeUser.name" + :info-text="activeUser.description" + :role="activeUser.role" + ></user-info> + <course-goals #default="slotProps"> + <h2>{{ slotProps.item }}</h2> + <p>{{ slotProps['another-prop'] }}</p> + </course-goals> + </div> +</template> + +<script> +import TheHeader from './components/TheHeader.vue'; +import BadgeList from './components/BadgeList.vue'; +import UserInfo from './components/UserInfo.vue'; +import CourseGoals from './components/CourseGoals.vue'; + +export default { + components: { + TheHeader, + BadgeList, + UserInfo, + CourseGoals, + }, + data() { + return { + activeUser: { + name: 'Maximilian Schwarzmüller', + description: 'Site owner and admin', + role: 'admin', + }, + }; + }, +}; +</script> + +<style> +html { + font-family: sans-serif; +} + +body { + margin: 0; +} +</style> \ No newline at end of file -- Gitblit v1.8.0