I'm trying to do a v-select with the options coming from my API, I have the data in an array of arrays.
Array which I got from API
It is supposed to be a select with a search because it's too many data.
Here is my code:
<v-select
:items="categoriasProduto"
v-model="dadosProduto.id_marca"
item-text="nome"
item-value="id"
label="Marca"
></v-select>
Script:
mounted() {
const url = process.env.VUE_APP_API_URL;
axios
.get(`${url}marcas/`)
.then((response) => {
this.marcas = response.data;
console.log(this.marcas);
});
},
It's there a way to make it work in Vue?