Below is the code snippet provided:
I have encountered similar issues to this before, but I am having trouble grasping the solution.
The goal is to insert a Bootstrap row after every 2 items in the list.
Vue.component('col-md-6', {
props: ['data'],
template: '<div class="col-md-6"><div class="form-group"> <label :for=" data.inid "> {{ data.label }} </label><input type="" :disabled="data.dsbl" class="form-control" :id=" data.inid " :placeholder=" data.label "> </div> </div>',
})
var inputgen = new Vue({
el: "#container",
data: {
inputs: [{
id: 0,
type: '',
inid: 'no',
dsbl: true,
label: 'Ariza №'
},
{
id: 1,
type: '',
inid: 'rw',
status: "",
label: 'Asosiy menu'
},
{
id: 2,
type: '',
inid: 'wer',
status: "",
label: 'Asosiy menu'
},
{
id: 3,
type: '',
inid: 'w4er',
status: "",
label: 'Asosiy menu'
},
]
},
})
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div class="row" id="container" >
<col-md-6 v-for="item in inputs" v-bind:data="item" v-bind:key="item.id"></col-md-6>
</div>