Skip to content
Snippets Groups Projects
Commit 46062a8a authored by Zara Mudassar's avatar Zara Mudassar
Browse files

Item-card component created, not connected to backend yet

parent d5849f78
No related branches found
No related tags found
3 merge requests!19Item card,!17Item card,!6Login form
src/assets/default-product.png

21.2 KiB

<template>
<v-card max-width="40%" class="text-left ma-5 pa-2">
<v-img
class="rounded-5"
:src="item.img || require('../assets/default-product.png')"
></v-img>
<v-card-subtitle>{{ item.adresse }}</v-card-subtitle>
<v-card-text class="font-weight-bold mb-n3 mt-n3">
{{ item.title }}
</v-card-text>
<v-card-subtitle>{{ item.price }}</v-card-subtitle>
</v-card>
</template>
<script>
export default {
name: "ItemCard.vue"
}
name: "ItemCard.vue",
data() {
return {
item: {
img: "",
adresse: "adresse",
title: "Tittel",
price: "pris kr",
},
};
},
};
</script>
<style scoped>
</style>
......@@ -2,7 +2,6 @@ import { createRouter, createWebHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";
import LoginView from "../views/LoginView.vue";
const routes = [
{
path: "/endre", //Endre før push
......@@ -19,15 +18,14 @@ const routes = [
import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
},
{
path: "/login",
path: "/",
name: "login",
component: LoginView,
},
{
path: "/item-card",
name: "itemView",
component: () =>
import("../views/ItemCardView.vue"),
component: () => import("../views/ItemCardView.vue"),
},
];
......
<template>
<ItemCard></ItemCard>
</template>
<script>
......@@ -9,9 +9,7 @@ export default {
components: {
ItemCard,
},
}
};
</script>
<style scoped>
</style>
<style scoped></style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment