Creating a product form component

The last page of our admin panel is the Create Product page, which on the face of it should be fairly simple as it's just a standard form that posts some data back to our API. However, when adding a new product, we have fairly complex requirements whereby we need to select a value from a variable length list of options—potentially more than we'd want to add to a standard HTML select element. We also need to support the addition of a variable-length list of complex product variant objects.

Create a new ClientApp/pages/admin/CreateProduct.vue file, with an initial template section that looks like this:

<template>  <div>    <div class="clearfix">      <h3 class="float-left">Add a new product</h3>      <b-button variant

Get ASP.NET Core 2 and Vue.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.