L5 ending code
This commit is contained in:
parent
a903dd19cb
commit
9ce75d24c2
@ -21,6 +21,13 @@
|
|||||||
<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>
|
||||||
|
|||||||
7
main.js
7
main.js
@ -4,7 +4,12 @@ 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' },
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user