L5 ending code

This commit is contained in:
Adam Jahr 2020-06-19 19:36:48 -04:00
parent a903dd19cb
commit 9ce75d24c2
2 changed files with 13 additions and 1 deletions

View File

@ -21,6 +21,13 @@
<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>
<ul>
<li v-for="size in sizes">{{ size }}</li>
</ul>
<div v-for="variant in variants" :key="variant.id">{{ variant.color }}</div>
</div>
</div>
</div>

View File

@ -4,7 +4,12 @@ const app = Vue.createApp({
product: 'Socks',
image: './assets/images/socks_blue.jpg',
inStock: true,
details: ['50% cotton', '30% wool', '20% polyester']
details: ['50% cotton', '30% wool', '20% polyester'],
sizes: ['S', 'M', 'L', 'XL'],
variants: [
{ id: 2234, color: 'green' },
{ id: 2235, color: 'blue' },
]
}
}
})