L5 starting code

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

View File

@ -21,13 +21,6 @@
<h1>{{ product }}</h1> <h1>{{ product }}</h1>
<p v-if="inStock">In Stock</p> <p v-if="inStock">In Stock</p>
<p v-else>Out of 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> </div>
</div> </div>

View File

@ -4,12 +4,7 @@ const app = Vue.createApp({
product: 'Socks', product: 'Socks',
image: './assets/images/socks_blue.jpg', image: './assets/images/socks_blue.jpg',
inStock: true, 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' },
]
} }
} }
}) })