Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const product = ref('Socks')
const image = ref(socksGreenImage)
const inStock = true
const details = ref(['50% cotton', '30% wool', '20% polyester'])
const variants = ref([
{ id: 2234, color: 'green'},
{ id: 2234, color: 'blue'}
])
const sizes = ref (['39', '40', '41', '42', '43', '44', '45'])
</script>

<template>
Expand All @@ -19,6 +24,13 @@ const details = ref(['50% cotton', '30% wool', '20% polyester'])
<h1>{{ product }}</h1>
<p v-if="inStock">In Stock</p>
<p v-else>Out of Stock</p>
<ul>
<li v-for="detail in details">{{ detail }}</li>
</ul>
<div v-for="varian in variants" :key="varian.id">{{ varian.color }}</div>
<ul>
<li v-for="size in sizes">{{ size }}</li>
</ul>
</div>
</div>
</div>
Expand Down