This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
2021-02-02 21:56:40 +01:00
|
|
|
"use strict";
|
2021-02-01 21:37:47 +01:00
|
|
|
|
2021-02-02 21:56:40 +01:00
|
|
|
import { createApp } from "vue";
|
2021-02-01 21:37:47 +01:00
|
|
|
|
2021-02-02 21:56:40 +01:00
|
|
|
import App from "./App.vue";
|
|
|
|
import ActiveUser from "./components/ActiveUser.vue";
|
|
|
|
import UserData from "./components/UserData.vue";
|
|
|
|
|
|
|
|
const app = createApp(App);
|
|
|
|
|
|
|
|
app.component("active-user", ActiveUser);
|
|
|
|
app.component("user-data", UserData);
|
|
|
|
|
|
|
|
app.mount("#app");
|
|
|
|
// Task 1:
|
|
|
|
// Add two components to the app:
|
2021-02-01 21:37:47 +01:00
|
|
|
// An ActiveUser component and an UserData component
|
|
|
|
// ActiveUser should output a username (h2) and age (h3)
|
|
|
|
// UserData should output two input fields => for name and age
|
|
|
|
// Optional: Add styling of your choice
|
|
|
|
|
|
|
|
// Task 2: Output both components side-by-side in your main App template
|
|
|
|
|
|
|
|
// Task 3: Add user data and ensure it contains a name and age
|
|
|
|
// User data should be output in ActiveUser
|
2021-02-02 21:56:40 +01:00
|
|
|
// It should be updated via the UserData component
|