v.0.0.6 AlbumCard
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tmp-app-creation",
|
"name": "tmp-app-creation",
|
||||||
"version": "0.0.0",
|
"version": "0.0.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+2
-6
@@ -10,7 +10,7 @@ import type { Album } from "./types/album.ts";
|
|||||||
|
|
||||||
document.title = `${pkg.name} ${pkg.version}©2026`;
|
document.title = `${pkg.name} ${pkg.version}©2026`;
|
||||||
|
|
||||||
const dummy_album: Album = {
|
const sample_album: Album = {
|
||||||
id: 1,
|
id: 1,
|
||||||
title: "Dummy Title",
|
title: "Dummy Title",
|
||||||
userId: 4711,
|
userId: 4711,
|
||||||
@@ -24,11 +24,7 @@ const dummy_album: Album = {
|
|||||||
>
|
>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<FirstVueComponent class="component-box-fade" />
|
<FirstVueComponent class="component-box-fade" />
|
||||||
<SecondVueComponent
|
<SecondVueComponent :album="sample_album" />
|
||||||
msg="Moin TiiJay"
|
|
||||||
text_size="text-sm"
|
|
||||||
:album="dummy_album"
|
|
||||||
/>
|
|
||||||
<FetchFromApi class="component-box-fade" />
|
<FetchFromApi class="component-box-fade" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
border: 2px solid #333;
|
border: 2px solid #333;
|
||||||
padding: 10px;
|
padding: 5px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin: 10px;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import type { Album } from "@/types/album";
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
album: {
|
||||||
|
type: Object as () => Album,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="card">
|
||||||
|
<p class="font-light">{{ album.id }}</p>
|
||||||
|
<p class="font-light">{{ album.title }}</p>
|
||||||
|
<p class="font-light">{{ album.userId }}</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang=""></style>
|
||||||
@@ -1,17 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { Album } from "@/types/album";
|
import type { Album } from "@/types/album";
|
||||||
|
import AlbumCard from "@/components/AlbumCard.vue";
|
||||||
|
|
||||||
const show_it = ref<boolean>(true);
|
const show_it = ref<boolean>(true);
|
||||||
defineProps({
|
defineProps({
|
||||||
msg: {
|
|
||||||
type: String,
|
|
||||||
default: "Hello default World",
|
|
||||||
},
|
|
||||||
text_size: {
|
|
||||||
type: String as () => "text-sm" | "text-2xl" | "text-4xl",
|
|
||||||
default: "text-2xl",
|
|
||||||
},
|
|
||||||
album: {
|
album: {
|
||||||
type: Object as () => Album,
|
type: Object as () => Album,
|
||||||
required: true,
|
required: true,
|
||||||
@@ -23,11 +16,8 @@ defineProps({
|
|||||||
<div
|
<div
|
||||||
class="m-2.5 w-1/3 rounded-2xl bg-linear-to-br from-emerald-200 to-emerald-500 border-2"
|
class="m-2.5 w-1/3 rounded-2xl bg-linear-to-br from-emerald-200 to-emerald-500 border-2"
|
||||||
>
|
>
|
||||||
<div class="p-1.5">
|
<div class="p-1.5 flex flex-wrap gap-3">
|
||||||
<p class="font-light" :class="text_size" v-if="show_it">{{ msg }}</p>
|
<AlbumCard v-for="n in 6" :key="n" :album="album" />
|
||||||
<p class="font-light">{{ album.id }}</p>
|
|
||||||
<p class="font-light">{{ album.title }}</p>
|
|
||||||
<p class="font-light">{{ album.userId }}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user